From 810bc1774f6a8e6c24d5a0c96e346a5ff0abc3df Mon Sep 17 00:00:00 2001 From: DL6ER Date: Wed, 14 Nov 2018 19:01:25 +0100 Subject: [PATCH] Install the systemd unit and add capabilities to pihole-FTL as this cannot be done from within the systemd script Signed-off-by: DL6ER --- automated install/basic-install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c49edda8..be58f0ef 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -2114,6 +2114,7 @@ FTLinstall() { # Always replace pihole-FTL.service install -T -m 0755 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.service" "/etc/init.d/pihole-FTL" + install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/Templates/pihole-FTL.systemd" "/etc/systemd/system/pihole-FTL.service" local ftlBranch local url @@ -2143,6 +2144,8 @@ FTLinstall() { stop_service pihole-FTL &> /dev/null # Install the new version with the correct permissions install -T -m 0755 "${binary}" /usr/bin/pihole-FTL + # Set net admin permissions so that FTL can serve DNS, DHCP and IMAP (for DHCPv6) + setcap CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN+eip "/usr/bin/pihole-FTL" # Move back into the original directory the user was in popd > /dev/null || { printf "Unable to return to original directory after FTL binary download.\\n"; return 1; } # Install the FTL service