Browse Source

update debian init script

run as root firstly, then switch to $USER by "-a" parameter, so that we can bind to port lower than 1024 when running as normal user.
pull/248/head
draplater 9 years ago
parent
commit
a9613596c9
1 changed files with 2 additions and 2 deletions
  1. 4
      debian/shadowsocks-libev.init

4
debian/shadowsocks-libev.init

@ -56,9 +56,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 --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid root:$GROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- \
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid root:$GROUP --exec $DAEMON -- \
-c "$CONFFILE" -a "$USER" -u -f $PIDFILE $DAEMON_ARGS \
|| return 2
}

Loading…
Cancel
Save