Explorar o código

Enhance regenconf. fix #2

Maniack Crudelis %!s(int64=8) %!d(string=hai) anos
pai
achega
93e2b5875e
Modificáronse 1 ficheiros con 5 adicións e 0 borrados
  1. 5 0
      conf/dnsmasq_regenconf_hook

+ 5 - 0
conf/dnsmasq_regenconf_hook

@@ -14,6 +14,11 @@ do_pre_regen() {
 	cp -a "/etc/dnsmasq.d/01-pihole.conf" "$temp_dir"
 	test -e "/etc/dnsmasq.d/02-pihole-dhcp.conf" && cp -a "/etc/dnsmasq.d/02-pihole-dhcp.conf" "$temp_dir"
 	test -e "/etc/dnsmasq.d/03-pihole-wildcard.conf" && cp -a "/etc/dnsmasq.d/03-pihole-wildcard.conf" "$temp_dir"
+
+	# Décommente le cache-size de la config par défaut
+	sed --in-place "s/^#pihole# cache-size=/cache-size=/g" /etc/dnsmasq.conf
+	# Et commente celui de pi-hole
+	sed --in-place "s/^cache-size=/#cache-size=/g" /etc/dnsmasq.d/01-pihole.conf
   fi
 }