From c143a6bdc216ce05efccef1164623b09b008437a Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Fri, 14 Feb 2025 15:14:27 +0100 Subject: [PATCH] Set servers if empty in dnsmasq --- omr-schedule/files/usr/share/omr/schedule.d/010-services | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/omr-schedule/files/usr/share/omr/schedule.d/010-services b/omr-schedule/files/usr/share/omr/schedule.d/010-services index 6e4628bfe..b42f83f5e 100755 --- a/omr-schedule/files/usr/share/omr/schedule.d/010-services +++ b/omr-schedule/files/usr/share/omr/schedule.d/010-services @@ -53,6 +53,15 @@ if [ -f /etc/init.d/dnsmasq ]; then fi fi +if [ -f /etc/init.d/dnsmasq ] && [ -z "$(uci -q get dhcp.@dnsmasq[0].server)" ]; then + uci -q batch <<-EOF >/dev/null + add_list dhcp.dnsmasq1.server='127.0.0.1#5353' + add_list dhcp.dnsmasq1.server='/lan/' + add_list dhcp.dnsmasq1.server='/use-application-dns.net/' + commit dhcp + EOF +fi + if [ "$(pgrep openvpn)" = "" ] && [ -f /etc/init.d/openvpn ]; then openvpn_enable=0 openvpn_enabled() {