My advice would be to put the script NOT somewhere in the home directory of a end user, but in a place more dedicated to root like /usr/local/bin.
Always make a clear divide between root and the user, even that user is one you trust likle yoursekve.
Consider what you must have in the stop part of the script. Ideally you should there kill your deamon in a neat way. Fetching the PID of the Python script (which then should be saved in a file by the Python script) and use the kill statment might be an option here.
Thanks hcw. I looked at the skeleton file, and i’m afraid that correctly modifying it appears to be beyond my ability at the moment.
Starting the script manually and then moving it to the background would be quite sufficient. Normally I would do that with the ‘bg’ command, but it does not seem to work on Suse. Is there a Suse version of it?
When you start a process from the shell and you want to detach it such that it runs independent (the shell not waiting until it ends, but returning with a prompt immediatly you use the $ at then end of the statment (like my example earlier). You can then exit the shell if youy like. But take care, the detached process still has connections by it’s stand input and standard output to the termminal where your shell is/was running. So better redirect it like this general case:
process --options several parameters <input >output 2>erroroutput &
the paragraph SHELL GRAMMAR, the sub-paragrapf Lists.
The detached process is still a child from the shell where you executed it until the moment you finish that shell. It then becomes a child of the init process (1).