In this script: http://dev.deluge-torrent.org/wiki/UserGuide/InitScript/Ubuntu this is the stop function: do_stop() { # Return # 0 if daemon has been stopped # 1 if daemon was already stopped # 2 if daemon could not be stopped # other if a failure occurred start-stop-daemon --stop --quiet --retry=TE...