-- net.listen('127.0.0.1', 44353, { kind = 'doh' })
-- net.listen('::1', 44353, { kind = 'doh' })
-- net.listen('127.0.0.1', 8453, { kind = 'webmgmt' })
--- net.listen('::1', 8453, { kind = 'webmgmt' })
-
--- Drop root privileges
-user('@0@', '@1@')'''.format(user, group)
+-- net.listen('::1', 8453, { kind = 'webmgmt' })'''
endif
Type=notify
WorkingDirectory=@systemd_work_dir@
ExecStart=@sbin_dir@/kresd --config=@etc_dir@/kresd.conf --forks=1
+User=@user@
+Group=@group@
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE CAP_SETPCAP
+AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_SETPCAP
TimeoutStopSec=10s
WatchdogSec=10s
Restart=on-abnormal