shadowsocks/utils/systemd/shadowsocks@.service
Yifu Yu 7a8635e54c 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.
2016-04-04 18:52:10 +08:00

14 lines
247 B
Desktop File

[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