Browse Source

rename variable

Bob Mottram 8 years ago
parent
commit
e5248e8ddb
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/freedombone-app-pihole

+ 5
- 3
src/freedombone-app-pihole View File

41
 
41
 
42
 piholeBasename=pihole
42
 piholeBasename=pihole
43
 piholeDir=/etc/$piholeBasename
43
 piholeDir=/etc/$piholeBasename
44
-PIHOLE_ADLIST=$piholeDir/adlists.list
44
+PIHOLE_CUSTOM_ADLIST=$piholeDir/adlists.list
45
 PIHOLE_BLACKLIST=$piholeDir/blacklist.txt
45
 PIHOLE_BLACKLIST=$piholeDir/blacklist.txt
46
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
46
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
47
 
47
 
59
     fi
59
     fi
60
     cp $INSTALL_DIR/pihole/adlists.default /etc/.pihole/adlists.default
60
     cp $INSTALL_DIR/pihole/adlists.default /etc/.pihole/adlists.default
61
     cp $INSTALL_DIR/pihole/adlists.default $piholeDir/adlists.default
61
     cp $INSTALL_DIR/pihole/adlists.default $piholeDir/adlists.default
62
-    cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_ADLIST
62
+    if [ ! -f $PIHOLE_CUSTOM_ADLIST ]; then
63
+        cp $INSTALL_DIR/pihole/adlists.default $PIHOLE_CUSTOM_ADLIST
64
+    fi
63
     cp $INSTALL_DIR/pihole/advanced/Scripts/* /opt/$piholeBasename
65
     cp $INSTALL_DIR/pihole/advanced/Scripts/* /opt/$piholeBasename
64
     if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
66
     if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
65
         rm /etc/dnsmasq.d/01-pihole.conf
67
         rm /etc/dnsmasq.d/01-pihole.conf
239
             255) exit 1;;
241
             255) exit 1;;
240
         esac
242
         esac
241
         case $(cat $data) in
243
         case $(cat $data) in
242
-            1) editor $PIHOLE_ADLIST
244
+            1) editor $PIHOLE_CUSTOM_ADLIST
243
                update_pihole_interactive
245
                update_pihole_interactive
244
                ;;
246
                ;;
245
             2) editor $PIHOLE_BLACKLIST
247
             2) editor $PIHOLE_BLACKLIST