Last active
February 14, 2019 05:36
-
-
Save Devnull6/3b958359d0030dba1d79fd1ce80eb1a2 to your computer and use it in GitHub Desktop.
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
#version2 | |
#通过增加pid参数来实现ss log记录的效果,网上搜索整理并实践的结果,之前版本加-d参数是会报错的,pid指定后则正常启动 | |
#Restart修改为always使其永久生效,参考:https://gist.github.com/guyskk/a9665bc6b2a89b73fae34678b1f6dc6b#gistcomment-2165288 | |
# vi /usr/lib/systemd/system/shadowsocks.service | |
[Unit] | |
Description=Shadowsocks Server | |
After=network.target | |
[Service] | |
Type=forking | |
PIDFile=/run/shadowsocks/ss.pid | |
PermissionsStartOnly=true | |
ExecStartPre=/bin/mkdir -p /run/shadowsocks | |
ExecStart=/usr/bin/ssserver --pid-file /var/run/shadowsocks/ss.pid --log-file /var/log/ss.log -c /etc/shadowsocks.json -d start | |
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