浏览代码

Change pihole interface if needed

Bob Mottram 8 年前
父节点
当前提交
a4318101ff
共有 1 个文件被更改,包括 8 次插入0 次删除
  1. 8
    0
      src/freedombone-app-pihole

+ 8
- 0
src/freedombone-app-pihole 查看文件

@@ -79,6 +79,14 @@ function pihole_update {
79 79
         return
80 80
     fi
81 81
 
82
+    if [[ $(config_param_exists WIFI_INTERFACE) == "0" ]]; then
83
+        PIHOLE_IFACE=eth0
84
+    else
85
+        read_config_param WIFI_INTERFACE
86
+        PIHOLE_IFACE=$WIFI_INTERFACE
87
+        write_config_param "PIHOLE_IFACE" "$PIHOLE_IFACE"
88
+    fi
89
+
82 90
     IPv4_address=$(get_ipv4_address)
83 91
     IPv6_address=$(get_ipv6_address)
84 92