瀏覽代碼

rename variable

Bob Mottram 8 年之前
父節點
當前提交
e5248e8ddb
共有 1 個檔案被更改,包括 5 行新增3 行删除
  1. 5
    3
      src/freedombone-app-pihole

+ 5
- 3
src/freedombone-app-pihole 查看文件

@@ -41,7 +41,7 @@ PIHOLE_DNS2='213.73.91.35'
41 41
 
42 42
 piholeBasename=pihole
43 43
 piholeDir=/etc/$piholeBasename
44
-PIHOLE_ADLIST=$piholeDir/adlists.list
44
+PIHOLE_CUSTOM_ADLIST=$piholeDir/adlists.list
45 45
 PIHOLE_BLACKLIST=$piholeDir/blacklist.txt
46 46
 PIHOLE_WHITELIST=$piholeDir/whitelist.txt
47 47
 
@@ -59,7 +59,9 @@ function pihole_copy_files {
59 59
     fi
60 60
     cp $INSTALL_DIR/pihole/adlists.default /etc/.pihole/adlists.default
61 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 65
     cp $INSTALL_DIR/pihole/advanced/Scripts/* /opt/$piholeBasename
64 66
     if [ -f /etc/dnsmasq.d/01-pihole.conf ]; then
65 67
         rm /etc/dnsmasq.d/01-pihole.conf
@@ -239,7 +241,7 @@ function configure_interactive_pihole {
239 241
             255) exit 1;;
240 242
         esac
241 243
         case $(cat $data) in
242
-            1) editor $PIHOLE_ADLIST
244
+            1) editor $PIHOLE_CUSTOM_ADLIST
243 245
                update_pihole_interactive
244 246
                ;;
245 247
             2) editor $PIHOLE_BLACKLIST