I have the following lines in one of my /etc/init.d scripts to start a service:
start-stop-daemon --start --quiet -c www --background --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet -c www --background --pidfile $PIDFILE --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
This is pretty much straight out of the provided skeleton file apart from the _-c www_ option.
The problem is that the pid file is not created, the PIDFILE var is correct but start-stop-daemon seems to ignore the --pidfile option. Anyone else seen this or know of another way I can create the pid file.