Install both, init.d and systemd scripts

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2018-04-15 20:58:04 +02:00
parent ba1e97787b
commit ee0cf07ee3

View File

@@ -1754,13 +1754,12 @@ FTLinstall() {
# Move into the temp ftl directory # Move into the temp ftl directory
pushd "$(mktemp -d)" > /dev/null || { echo "Unable to make temporary directory for FTL binary download"; return 1; } 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 # Always replace pihole-FTL.service (init.d script)
if [ -e "/etc/init.d/pihole-FTL" ]; then install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/pihole-FTL.initd" "/etc/init.d/pihole-FTL"
rm "/etc/init.d/pihole-FTL"
fi
# Always replace pihole-FTL.service # Always replace pihole-FTL.service (systemd unit)
install -T -m 0644 "${PI_HOLE_LOCAL_REPO}/advanced/pihole-FTL.service" "/etc/systemd/system/pihole-FTL.service" install -T -m 0644 "${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) # Enable service script (we have to do this after replacing the service unit)
systemctl enable pihole-FTL.service systemctl enable pihole-FTL.service