Merge pull request #159 from hdid/patch-1

refine init script
This commit is contained in:
Max Lv
2014-11-18 08:29:18 +08:00
+2 -2
View File
@@ -1,6 +1,6 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: shadowsocks
# Provides: shadowsocks-libev
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
@@ -73,7 +73,7 @@ do_stop()
# 1 if daemon was already stopped
# 2 if daemon could not be stopped
# other if a failure occurred
start-stop-daemon --stop --quiet --retry=KILL/5 --pidfile $PIDFILE --name $NAME
start-stop-daemon --stop --quiet --retry=KILL/5 --pidfile $PIDFILE --exec $DAEMON
RETVAL="$?"
[ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks