Browse Source

refine init script

start-stop-daemon can not process names longer than 15 characters!
pull/159/head
hdid 10 years ago
parent
commit
9ac309c5b1
1 changed files with 2 additions and 2 deletions
  1. 4
      debian/shadowsocks-libev.init

4
debian/shadowsocks-libev.init

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: shadowsocks
# Provides: shadowsocks-libev
# Required-Start: $network $local_fs $remote_fs # Required-Start: $network $local_fs $remote_fs
# Required-Stop: $remote_fs # Required-Stop: $remote_fs
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
@ -73,7 +73,7 @@ do_stop()
# 1 if daemon was already stopped # 1 if daemon was already stopped
# 2 if daemon could not be stopped # 2 if daemon could not be stopped
# other if a failure occurred # 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="$?"
[ "$RETVAL" = 2 ] && return 2 [ "$RETVAL" = 2 ] && return 2
# Wait for children to finish too if this is a daemon that forks # Wait for children to finish too if this is a daemon that forks

Loading…
Cancel
Save