From 73de49323c13f1e87f68e272e9a71e12d03e3f65 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 21 Feb 2023 21:49:03 +0100 Subject: [PATCH] Remove systemd service and optionally override configs on uninstall This has been forgotten when adding the new native systemd service. Signed-off-by: MichaIng --- automated install/uninstall.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/automated install/uninstall.sh b/automated install/uninstall.sh index c36027fc..7a1a290d 100755 --- a/automated install/uninstall.sh +++ b/automated install/uninstall.sh @@ -193,6 +193,18 @@ removeNoPurge() { else service pihole-FTL stop fi + ${SUDO} rm -f /etc/systemd/system/pihole-FTL.service + if [[ -d '/etc/systemd/system/pihole-FTL.service.d' ]]; then + read -rp " ${QST} FTL service override directory /etc/systemd/system/pihole-FTL.service.d detected. Do you wish to remove this from your system? [y/N] " answer + case $answer in + [yY]*) + echo -ne " ${INFO} Removing /etc/systemd/system/pihole-FTL.service.d..." + ${SUDO} rm -R /etc/systemd/system/pihole-FTL.service.d + echo -e "${OVER} ${INFO} Removed /etc/systemd/system/pihole-FTL.service.d" + ;; + *) echo -e " ${INFO} Leaving /etc/systemd/system/pihole-FTL.service.d in place.";; + esac + fi ${SUDO} rm -f /etc/init.d/pihole-FTL ${SUDO} rm -f /usr/bin/pihole-FTL echo -e "${OVER} ${TICK} Removed pihole-FTL"