fix execution order for dnsmasq

This commit is contained in:
Alfonso Gamboa
2022-08-08 11:34:03 -07:00
parent df0d8631b6
commit ee2fd1b757
3 changed files with 19 additions and 12 deletions

View File

@@ -6,18 +6,25 @@
### END INIT INFO
. /opt/wz_mini/wz_mini.conf
. /opt/wz_mini/etc/rc.common
dnsmasq_launch() {
wait_for_wlan_ip
echo "#####$(basename "$0")#####"
if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
rm -f /tmp/resolv.conf
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
echo "dnsmasq enabled"
fi
}
case "$1" in
start)
echo "#####$(basename "$0")#####"
if [[ "$ENABLE_LOCAL_DNS" == "true" ]]; then
dnsmasq -C /opt/wz_mini/etc/dnsmasq.conf
rm -f /tmp/resolv.conf
cp /opt/wz_mini/etc/resolv.conf /tmp/resolv.conf
echo "dnsmasq enabled"
fi
dnsmasq_launch &
;;
stop)
pkill dnsmasq

View File

@@ -1 +1 @@
Sun Aug 7 07:01:19 PM PDT 2022
Mon Aug 8 11:33:30 AM PDT 2022