summarylogtreecommitdiffstats
path: root/mosdns.service
diff options
context:
space:
mode:
authorHenry-ZHR2022-11-13 10:33:48 +0800
committerHenry-ZHR2022-11-13 10:33:48 +0800
commitd2162464d611dd019622f2d92d0546224a836f37 (patch)
treeb4dfcc2855dac05a40a424bcdb89abcfef5bad43 /mosdns.service
parentb1c796e6ae556fe2d8651cae9a87597ab8ba4e67 (diff)
downloadaur-d2162464d611dd019622f2d92d0546224a836f37.tar.gz
Run in separated user & add completions
Diffstat (limited to 'mosdns.service')
-rw-r--r--mosdns.service6
1 files changed, 5 insertions, 1 deletions
diff --git a/mosdns.service b/mosdns.service
index dad2983c2e95..692937706d99 100644
--- a/mosdns.service
+++ b/mosdns.service
@@ -5,7 +5,11 @@ After=network.target
[Service]
Type=exec
ExecStart=/usr/bin/mosdns start -c /etc/mosdns/config.yaml -d /etc/mosdns
-Restart=on-failure
+Restart=on-abnormal
+User=mosdns
+CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
+NoNewPrivileges=true
[Install]
WantedBy=multi-user.target