mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-11-01 07:30:02 +00:00
update scripts
This commit is contained in:
Vendored
+3
@@ -18,3 +18,6 @@ DAEMON_ARGS=""
|
||||
# User and group to run the server as
|
||||
USER=root
|
||||
GROUP=root
|
||||
|
||||
# Number of maximum file descriptors
|
||||
MAXFD=1024
|
||||
|
||||
Vendored
+4
-1
@@ -45,6 +45,9 @@ SCRIPTNAME=/etc/init.d/$NAME
|
||||
#
|
||||
do_start()
|
||||
{
|
||||
# Modify the file descriptor limit
|
||||
ulimit -n ${MAXFD}
|
||||
|
||||
# Take care of pidfile permissions
|
||||
mkdir /var/run/$NAME 2>/dev/null || true
|
||||
chown "$USER:$GROUP" /var/run/$NAME
|
||||
@@ -56,7 +59,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" -a "$USER" -u -f $PIDFILE $DAEMON_ARGS \
|
||||
-c "$CONFFILE" -u -f $PIDFILE $DAEMON_ARGS \
|
||||
|| return 2
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user