From bc51f88805a12c85e1b3e27ea42d3016ae16f4bc Mon Sep 17 00:00:00 2001 From: Promofaux Date: Tue, 19 Jan 2016 22:52:29 +0000 Subject: [PATCH] Check if any list.* files exist from previous installation, if they do delete them. --- automated install/basic-install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/automated install/basic-install.sh b/automated install/basic-install.sh index 82cfbf96..aa56b45d 100755 --- a/automated install/basic-install.sh +++ b/automated install/basic-install.sh @@ -271,6 +271,15 @@ installCron(){ $SUDO curl -o /etc/cron.d/pihole https://raw.githubusercontent.com/jacobsalmela/pi-hole/master/advanced/pihole.cron } +tidyEtcPihole() +{ +if ls /etc/pihole/list* 1> /dev/null 2>&1; then + echo "Cleaning up previous install" + $SUDO rm /etc/pihole/list.* +fi + +} + installPihole() { installDependencies @@ -284,6 +293,7 @@ installConfigs installWebAdmin installPiholeWeb installCron +tidyEtcPihole $SUDO /usr/local/bin/gravity.sh }