EDIT this is fixed. See my answer below.
I have a headless server running transmission-daemon on Angstrom Linux. I am able to SSH into the machine and invoke transmission-daemon via this init script; however, the process terminates as soon as I log out.
The command issued in the script is:
start-stop-daemon --chuid transmission --start --pidfile /var/run/transmission-daemon.pid --make-pidfile --exec /usr/local/bin/transmission-daemon --background -- -f
After starting the daemon via # /etc/init.d/transmission-daemon start
, I can verify using ps
that the process is owned by the user transmission
(which is not the user I am logging in as via SSH).
I've tried every variation of the above command that I am aware of, including:
- With and without the
--background
option for start-stop-daemon - Appending
> /dev/null 2>&1 &
to the start-stop-daemon command (source -- although there seems to be mixed results in that thread as to whether this is the right approach) - Appending
> /dev/null 2>&1 & </dev/null &
(source) - Adding
&
to the end of the command - Using
nohup
None of these seems to work -- the result is always the same: the process exits immediately after I close the SSH session.
What can/should I do to keep the daemon running after I disconnect the SSH session?