Added systemd service file.

**This is a shadowsocks server service, not client service.**
If you need client service, please modify ssserver to sslocal.

For those who wonder why I didn't use the -d start/stop/restart instead
of using forking type of service, shadowsocks defaults writes to a log
file under daemon mode instead of output to stdout/stderr, which can't
be captured by systemd, so I use the simple mode and keep shadowsocks
foreground.
This commit is contained in:
Yifu Yu 2016-04-04 18:52:10 +08:00
parent 5b58069f14
commit 7a8635e54c

View file

@ -0,0 +1,14 @@
[Unit]
Description=Shadowsocks daemon %i
After=network.target
[Service]
ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/%i.json
Restart=on-failure
KillMode=process
KillSignal=SIGQUIT
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target