ID:103252
 
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Can a command-line argument to DreamDaemon be added that saves the pid of the process to the specified file?

eg DreamDaemon -pid pidfile
Would be nice, saves the usual wrapper script I write to grab the PID afterwards and write to file myself.
This can be done by using the Start-stop Daemon,
This is to start it;
/sbin/start-stop-daemon -d /path/to/game -p /path/to/pidfile/pidfile.pid -m -b -S -x /usr/local/byond/bin/DreamDaemon -- /path/to/game/game.dmb 1337 -safe -logself -quiet

To stop it use:
/sbin/start-stop-daemon -p /path/to/pidfile/pidfile.pid -K -s 15
Depending on a third party tool to provide pid access isn't what I'm interested in, also, start-stop-daemon is a Linux thing, and I don't care to find a suitable FreeBSD replacement when this could be implemented directly into DreamDaemon.
Would be handy.
I use something similar, this week I've actually been in the process of creating some wrappers for Linux users.
I'll make a forum post about it later...