blob: a30be18537ebd8e00272e9d46c8d4e6696462dbc (
plain)
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
|
# This file is derived from the default unit file for shadowsocks-rust.
# This is the user-specific version of this unit.
#
# Users should create a new directory under $XDG_CONFIG_HOME/shadowsocks-rust/server
# as the profile directory and place a "ss.json5" file under it.
#
# For example, if you want to name your profile "bar", you should have
# the following directory structure:
#
# $XDG_CONFIG_HOME/shadowsocks-rust/server/bar
# └─ ss.json5
#
# You can now enable your service like this:
#
# systemctl --user enable --now shadowsocks-rust-server@bar.service
[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
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_BIND_SERVICE
WorkingDirectory=%E/shadowsocks-rust/server/%i
ExecStart=/usr/bin/ssserver --log-without-time -c ss.json5
Restart=always
RestartSec=3s
[Install]
WantedBy=default.target
|