Created
April 20, 2019 02:24
-
-
Save jahentao/128b34b371b4c6c38de1ea25878a7251 to your computer and use it in GitHub Desktop.
systemd脚本,适用于CentOS/RHEL7以上,Ubuntu 15以上,Debian8以上
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
[Unit] | |
Description=ShadowsocksR client | |
After=network.target | |
Wants=network.target | |
[Service] | |
Type=forking | |
PIDFile=/var/run/shadowsocksr.pid | |
ExecStart=/usr/bin/python /opt/shadowsocksr/shadowsocks/local.py -c /etc/shadowsocks.json -d start | |
ExecStop=/usr/bin/python /opt/shadowsocksr/shadowsocks/local.py -c /etc/shadowsocks.json -d stop | |
ExecReload=/bin/kill -HUP $MAINPID | |
KillMode=process | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment