From d2e43d9288112a4d1c66d45d87484bbb8fedb33f Mon Sep 17 00:00:00 2001 From: nxshock Date: Sat, 3 Apr 2021 20:57:15 +0500 Subject: [PATCH] Run service as separate user --- contrib/systemd/alfis.service | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/systemd/alfis.service b/contrib/systemd/alfis.service index bb7f663..a5851ee 100644 --- a/contrib/systemd/alfis.service +++ b/contrib/systemd/alfis.service @@ -6,11 +6,12 @@ After=network.target After=alfis-default-config.service [Service] +User=alfis Group=alfis ProtectHome=true ProtectSystem=true SyslogIdentifier=alfis -CapabilityBoundingSet=CAP_NET_ADMIN +CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE WorkingDirectory=/var/lib/alfis ExecStart=/usr/bin/alfis -n -c /etc/alfis.conf ExecReload=/bin/kill -HUP $MAINPID @@ -18,4 +19,4 @@ Restart=always TimeoutStopSec=5 [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target