diff --git a/release/config/sing-box.service b/release/config/sing-box.service index 6369b1ba..707efe5d 100644 --- a/release/config/sing-box.service +++ b/release/config/sing-box.service @@ -4,6 +4,7 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target [Service] +WorkingDirectory=/var/lib/sing-box CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE ExecStart=/usr/bin/sing-box run -c /etc/sing-box/config.json diff --git a/release/config/sing-box@.service b/release/config/sing-box@.service index e12a46e1..d6292a04 100644 --- a/release/config/sing-box@.service +++ b/release/config/sing-box@.service @@ -4,6 +4,7 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target [Service] +WorkingDirectory=/var/lib/sing-box-%i CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE ExecStart=/usr/bin/sing-box run -c /etc/sing-box/%i.json diff --git a/release/local/sing-box.service b/release/local/sing-box.service index 9a234645..94fce13d 100644 --- a/release/local/sing-box.service +++ b/release/local/sing-box.service @@ -4,6 +4,7 @@ Documentation=https://sing-box.sagernet.org After=network.target nss-lookup.target [Service] +WorkingDirectory=/var/lib/sing-box CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE ExecStart=/usr/local/bin/sing-box run -c /usr/local/etc/sing-box/config.json