From e5248e8ddb4789a5e8ade729a45450c2b562ff79 Mon Sep 17 00:00:00 2001
From: Bob Mottram <bob@robotics.uk.to>
Date: Tue, 1 Nov 2016 10:09:07 +0000
Subject: [PATCH] rename variable

---
 src/freedombone-app-pihole | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/freedombone-app-pihole b/src/freedombone-app-pihole
index d9425f73a..721e06567 100755
--- a/src/freedombone-app-pihole
+++ b/src/freedombone-app-pihole
@@ -41,7 +41,7 @@ PIHOLE_DNS2='213.73.91.35'
 
 piholeBasename=pihole
 piholeDir=/etc/$piholeBasename
-PIHOLE_ADLIST=$piholeDir/adlists.list
+PIHOLE_CUSTOM_ADLIST=$piholeDir/adlists.list
 PIHOLE_BLACKLIST=$piholeDir/blacklist.txt
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
 
@@ -59,7 +59,9 @@ function pihole_copy_files {
     fi
     cp $INSTALL_DIR/pihole/adlists.default /etc/.pihole/adlists.default
     cp $INSTALL_DIR/pihole/adlists.default $piholeDir/adlists.default
-    cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_ADLIST
+    if [ ! -f $PIHOLE_CUSTOM_ADLIST ]; then
+        cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_CUSTOM_ADLIST
+    fi
     cp $INSTALL_DIR/pihole/advanced/Scripts/* /opt/$piholeBasename
     if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
         rm /etc/dnsmasq.d/01-pihole.conf
@@ -239,7 +241,7 @@ function configure_interactive_pihole {
             255) exit 1;;
         esac
         case $(cat $data) in
-            1) editor $PIHOLE_ADLIST
+            1) editor $PIHOLE_CUSTOM_ADLIST
                update_pihole_interactive
                ;;
             2) editor $PIHOLE_BLACKLIST
-- 
GitLab