I have a daemon called mydaemon.bin
and a shell script called start-my-daemon.sh
that sets some environment variables and then starts mydaemon.bin
, which in turn calls the unix function daemon
to daemonize itself and then creates a pidfile in $PIDFILE
.
To start the daemon under Suse 10.0 I've written an init script that uses start_daemon -p $PIDFILE mydaemon.bin
, however in 9 of 10 cases start_daemon
returns with exit code 7 although the daemon started successfully. Even pidof proc
does return the right pid. In case #10 it returns 0 as it should.
Any hints?
Program is not running
. Are there hints in syslog? – ott-- May 2 at 23:52strace -fv start_daemon ...
(insert program and args). – ott-- May 3 at 14:37