mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-29 04:03:45 +00:00
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.
This commit is contained in:
Vendored
+2
-2
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user