2022-08-12 22:53:46 +08:00
|
|
|
[Unit]
|
|
|
|
Description=sing-box service
|
|
|
|
Documentation=https://sing-box.sagernet.org
|
|
|
|
After=network.target nss-lookup.target
|
|
|
|
|
|
|
|
[Service]
|
2022-11-28 17:46:30 +08:00
|
|
|
WorkingDirectory=/var/lib/sing-box-%i
|
2023-02-09 13:30:43 +08:00
|
|
|
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
|
|
|
|
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
|
2022-08-12 22:53:46 +08:00
|
|
|
ExecStart=/usr/bin/sing-box run -c /etc/sing-box/%i.json
|
2023-03-06 16:11:12 +08:00
|
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
2022-08-12 22:53:46 +08:00
|
|
|
Restart=on-failure
|
|
|
|
RestartSec=10s
|
|
|
|
LimitNOFILE=infinity
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|