Skip to content

Commit 536b349

Browse files
authored
Remove ftl systemd service and optionally service override files in uninstall script (#5183)
2 parents 8f09a1d + 73de493 commit 536b349

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

automated install/uninstall.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,18 @@ removeNoPurge() {
193193
else
194194
service pihole-FTL stop
195195
fi
196+
${SUDO} rm -f /etc/systemd/system/pihole-FTL.service
197+
if [[ -d '/etc/systemd/system/pihole-FTL.service.d' ]]; then
198+
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
199+
case $answer in
200+
[yY]*)
201+
echo -ne " ${INFO} Removing /etc/systemd/system/pihole-FTL.service.d..."
202+
${SUDO} rm -R /etc/systemd/system/pihole-FTL.service.d
203+
echo -e "${OVER} ${INFO} Removed /etc/systemd/system/pihole-FTL.service.d"
204+
;;
205+
*) echo -e " ${INFO} Leaving /etc/systemd/system/pihole-FTL.service.d in place.";;
206+
esac
207+
fi
196208
${SUDO} rm -f /etc/init.d/pihole-FTL
197209
${SUDO} rm -f /usr/bin/pihole-FTL
198210
echo -e "${OVER} ${TICK} Removed pihole-FTL"

0 commit comments

Comments
 (0)