From cd332a8ecab2d38825c690efbf74a6bac0284ae4 Mon Sep 17 00:00:00 2001 From: DL6ER Date: Sat, 14 Apr 2018 10:41:20 +0200 Subject: [PATCH] Remove old init.d script if present as it cannot coexist with the systemd unit we are installing now Signed-off-by: DL6ER --- automated install/basic-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index c719953c..01cf80f0 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -1754,6 +1754,11 @@ FTLinstall() { # Move into the temp ftl directory pushd "$(mktemp -d)" > /dev/null || { echo "Unable to make temporary directory for FTL binary download"; return 1; } + # Remove old init.d script if present as it cannot coexist with the systemd unit we are installing here + if [ -e "/etc/init.d/pihole-FTL" ]; then + rm "/etc/init.d/pihole-FTL" + fi + # Always replace pihole-FTL.service install -T -m 0755 "${PI_HOLE_LOCAL_REPO}/advanced/pihole-FTL.service" "/etc/systemd/system/pihole-FTL.service" # Enable service script (we have to do this after replacing the service unit)