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:
parent
5b58069f14
commit
7a8635e54c
1 changed files with 14 additions and 0 deletions
14
utils/systemd/shadowsocks@.service
Normal file
14
utils/systemd/shadowsocks@.service
Normal 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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue