Created
October 15, 2018 15:03
-
-
Save SimonTart/e310eb2345683501e5e11fdc47003cff to your computer and use it in GitHub Desktop.
init.d_shadowsocks
This file contains hidden or 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