[email protected] 521 B

12345678910111213141516
  1. [Unit]
  2. Description=sing-box service
  3. Documentation=https://sing-box.sagernet.org
  4. After=network.target nss-lookup.target
  5. [Service]
  6. CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
  7. AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE CAP_SYS_PTRACE CAP_DAC_READ_SEARCH
  8. ExecStart=/usr/bin/sing-box -D /var/lib/sing-box-%i -c /etc/sing-box/%i.json run
  9. ExecReload=/bin/kill -HUP $MAINPID
  10. Restart=on-failure
  11. RestartSec=10s
  12. LimitNOFILE=infinity
  13. [Install]
  14. WantedBy=multi-user.target