Browse Source

Better support for daemon command line arguments.

Put DAEMON_ARGS into init script and add it to service default
configuration.
pull/56/head
Hexcles Ma 10 years ago
parent
commit
2943e176d1
2 changed files with 4 additions and 1 deletions
  1. 3
      debian/shadowsocks.default
  2. 2
      debian/shadowsocks.init

3
debian/shadowsocks.default

@ -12,6 +12,9 @@ START=yes
# Configuration file
CONFFILE="/etc/shadowsocks/config.json"
# Extra command line arguments
DAEMON_ARGS=""
# User and group to run the server as
USER=root
GROUP=root

2
debian/shadowsocks.init

@ -56,7 +56,7 @@ do_start()
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \
|| return 1
start-stop-daemon --start --quiet --pidfile $PIDFILE --chuid $USER:$GROUP --exec $DAEMON -- \
-c "$CONFFILE" -f $PIDFILE \
-c "$CONFFILE" -f $PIDFILE $DAEMON_ARGS \
|| return 2
}

Loading…
Cancel
Save