Update shadowsocks-go-debian

This commit is contained in:
Teddysun 2015-03-09 19:22:27 +08:00
parent ba8fe49b65
commit 7db2885b0e

View File

@ -2,9 +2,9 @@
# Start/stop shadowsocks. # Start/stop shadowsocks.
# #
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: shadowsocks # Provides: shadowsocks-go
# Required-Start: # Required-Start: $network $local_fs $remote_fs
# Required-Stop: # Required-Stop: $remote_fs
# Should-Start: # Should-Start:
# Should-Stop: # Should-Stop:
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
@ -17,9 +17,6 @@
BIN=/usr/bin/shadowsocks-server BIN=/usr/bin/shadowsocks-server
CONFIG_FILE=/etc/shadowsocks/config.json CONFIG_FILE=/etc/shadowsocks/config.json
#LOG_FILE=/var/log/shadowsocks
#USER=nobody
#GROUP=nobody
PID_DIR=/var/run PID_DIR=/var/run
PID_FILE=$PID_DIR/shadowsocks.pid PID_FILE=$PID_DIR/shadowsocks.pid
RET_VAL=0 RET_VAL=0
@ -70,7 +67,7 @@ do_start() {
fi fi
echo "starting shadowsocks-go" echo "starting shadowsocks-go"
# sudo will set the group to the primary group of $USER # sudo will set the group to the primary group of $USER
$BIN -c $CONFIG_FILE & $BIN -c $CONFIG_FILE > /dev/null 2>&1 &
PID=$! PID=$!
echo $PID > $PID_FILE echo $PID > $PID_FILE
sleep 0.3 sleep 0.3