Run service as separate user

This commit is contained in:
nxshock
2021-04-03 20:57:15 +05:00
committed by GitHub
parent f9e90ff655
commit d2e43d9288
+3 -2
View File
@@ -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
WantedBy=multi-user.target