Created
February 12, 2019 01:07
-
-
Save tisyang/0b6a54165536787552822b1e90d188da to your computer and use it in GitHub Desktop.
shadowsocks serivce file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: shadowsocks | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: start shadowsocks | |
# Description: start shadowsocks | |
### END INIT INFO | |
start(){ | |
ssserver -c /etc/shadowsocks.json -d start | |
} | |
stop(){ | |
ssserver -c /etc/shadowsocks.json -d stop | |
} | |
case "$1" in | |
start) | |
start | |
;; | |
stop) | |
stop | |
;; | |
reload) | |
stop | |
start | |
;; | |
*) | |
echo "Usage: $0 {start|reload|stop}" | |
exit 1 | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment