-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (36 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# This file is derived from the default unit file for shadowsocks-rust.
# This is the system-wide version of this unit.
#
# Users should create a new directory under /etc/shadowsocks-rust/server as the
# profile directory and place a "ss.json5" file under it.
#
# This is the configuration file passed to ssserver. For how to configure
# ssserver, see https://github.com/shadowsocks/shadowsocks-rust#getting-started
#
# For example, if you want to name your profile "bar", you should have the
# following directory structure:
#
# /etc/shadowsocks-rust/server/bar
# └─ ss.json5
#
# You can now enable your service like this:
#
# sudo systemctl enable --now [email protected]
[Unit]
Description=Shadowsocks-rust Server Service for %I
Documentation=https://github.com/shadowsocks/shadowsocks-rust
After=network.target
StartLimitIntervalSec=30s
StartLimitBurst=5
[Service]
Type=simple
User=shadowsocks-rust
Group=shadowsocks-rust
WorkingDirectory=%E/shadowsocks-rust/server/%i
AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_ADMIN
NoNewPrivileges=true
ExecStart=/usr/bin/ssservice server --log-without-time -c ss.json5
Restart=always
RestartSec=3s
[Install]
WantedBy=multi-user.target