summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2015-06-18 16:21:49 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2015-06-18 17:15:28 -0400
commitf794a976ca60d2dece62f778e56d1f7c0427dcc1 (patch)
tree0269dfd87e9204747dedbdfc2f5ad1f91c20999f
parentcb9bceb04e35314c461a7cd1f9dff3561c5cd135 (diff)
properly implement daemon
-rw-r--r--files/autossh.init.d4
1 files changed, 2 insertions, 2 deletions
diff --git a/files/autossh.init.d b/files/autossh.init.d
index fdb2c16..95670d3 100644
--- a/files/autossh.init.d
+++ b/files/autossh.init.d
@@ -46,9 +46,9 @@ do_start()
# 0 if daemon has been started
# 1 if daemon was already running
# 2 if daemon could not be started
- start-stop-daemon --start --quiet --user $USER --pidfile $PIDFILE --exec $DAEMON --test > /dev/null \
+ start-stop-daemon --start --quiet --background --user $USER --pidfile $PIDFILE --makepidfile --exec $DAEMON --test > /dev/null \
|| return 1
- start-stop-daemon --start --quiet --user $USER --chuid $USER --pidfile $PIDFILE --exec $DAEMON -- \
+ start-stop-daemon --start --quiet --background --user $USER --chuid $USER --pidfile $PIDFILE --makepidfile --exec $DAEMON -- \
$DAEMON_ARGS \
|| return 2
# The above code will not work for interpreted scripts, use the next