1
0
mirror of https://github.com/pi-hole/pi-hole synced 2025-07-30 10:58:08 +00:00

Remove old init.d script if present as it cannot coexist with the systemd unit we are installing now

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER 2018-04-14 10:41:20 +02:00
parent 9b0aa6e561
commit cd332a8eca
No known key found for this signature in database
GPG Key ID: 00135ACBD90B28DD

View File

@ -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)