Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
shadowsocksR manyuser service control init script
#!/bin/sh
### BEGIN INIT INFO
# Provides: ShadowsocksR
# Required-Start: $network $syslog
# Required-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: ShadowsocksR init script
### END INIT INFO
start(){
bash /root/ss/logrun.sh
}
stop(){
bash /root/ss/stop.sh
}
tail(){
bash /root/ss/tail.sh
}
log(){
cat /root/ss/ssserver.log
}
clear(){
rm /root/ss/ssserver.log
}
update(){
cd /root/ss/ && git pull
}
case "$1" in
start)
start
;;
stop)
stop
;;
tail)
tail
;;
log)
log
;;
clear)
clear
;;
update)
update
;;
restart)
start
;;
*)
echo "Usage: $0 {start|restart|stop|tail|log|clear|update}"
exit 1
;;
esac
@mikelei8291

This comment has been minimized.

Copy link
Owner Author

commented Jun 8, 2017

Notice

Rename shadowsocksR source code directory from shadowsocks to ss to use this init script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.