Description of problem: tinyerp-server startup script contains code like | start() { | # create temporary startup script to get pid of the server process | cat > /tmp/tinyerp-server.run << EOF This is highly insecure and should never be used. Alternatives: (a) use 'mktemp' to create the temporary file in a secure manner (b) start the daemon in a way like | daemon --user tinyerp "/usr/bin/setsid /usr/bin/tinyerp-server $OPTS >> /var/log/tinyerp/tinyerp-server.log 2>&1" and remove all the /tmp stuff I would use variant (b) Version-Release number of selected component (if applicable): tinyerp-server-3.1.1-4.fc4
OK, I will try to use variant (b) This is what I wanted to do, but did not exactly know how. I modified it to start /usr/bin/tinyerp-server in background. daemon --user tinyerp --check tinyerp-server "/usr/bin/setsid /usr/bin/tinyerp-server $OPTS >> /var/log/tinyerp/tinyerp-server.log 2>&1 &" Now I have to modify also the startup script generated in setup.py to create a pidfile so the server can be stopped.
The '&' should not be needed because 'setsid' sends processes into background. fwiw, when you want a pidfile and dirty hacks, you could write | daemon ... "echo \$\$ >&42; exec setsid ..." 42>...the-pidfile...
I have modified the /usr/bin/tinyerp-server script, pidfile (with echo $$ ;-) ) is created in /var/spool/tinyerp and both staring and stopping works. Released tinyerp-3.1.1-5