summarylogtreecommitdiffstats
path: root/xray.service.tmpl
diff options
context:
space:
mode:
authorghesy2023-02-05 22:00:17 +0330
committerghesy2023-02-05 22:01:10 +0330
commitb83f3f1df36a1d25a3211eff179a877057ecccf8 (patch)
treeff7f34df3a3c10cbd7718ef5160b6299d9040a95 /xray.service.tmpl
parent213281a1ddfb87a4bcb69bbbad44a672ab2857ca (diff)
downloadaur-b83f3f1df36a1d25a3211eff179a877057ecccf8.tar.gz
refactor and update to the latest version
Diffstat (limited to 'xray.service.tmpl')
-rw-r--r--xray.service.tmpl14
1 files changed, 14 insertions, 0 deletions
diff --git a/xray.service.tmpl b/xray.service.tmpl
new file mode 100644
index 000000000000..315269d3d967
--- /dev/null
+++ b/xray.service.tmpl
@@ -0,0 +1,14 @@
+[Unit]
+Description=Xray Service
+After=network.target nss-lookup.target
+
+[Service]
+User=xray
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
+ExecStart=/usr/bin/xray run -config ${TMPL_CONFIG_FILE_PATH}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target