Use runuser instead of su in init.d script

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-11-14 18:56:24 +01:00
parent 1f596eb2bc
commit 1463625812

View File

@@ -41,7 +41,7 @@ start() {
chmod 0644 /var/log/pihole-FTL.log /run/pihole-FTL.pid /run/pihole-FTL.port /var/log/pihole.log
echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.piholeFTL
if setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+eip "$(which pihole-FTL)"; then
su -s /bin/sh -c "/usr/bin/pihole-FTL" "$FTLUSER"
runuser -u "$FTLUSER" "/usr/bin/pihole-FTL"
else
echo "Warning: Starting pihole-FTL as root because setting capabilities is not supported on this system"
pihole-FTL