Skip to content

Instantly share code, notes, and snippets.

@Devnull6
Devnull6 / shadowsocks-server.service
Last active February 13, 2019 09:15 — forked from guyskk/shadowsocks-server.service
shadowsocks server systemd service
[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
#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