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=Shadowsocks Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/ss-config.json | |
Restart=on-abort | |
[Install] | |
WantedBy=multi-user.target |
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 |