VARS="$(resolvconf -v)"
eval "${VARS}"
-PREFIX=/
+PREFIX=
DNSMASQRESOLV="${PREFIX}/etc/dnsmasq-resolv.conf"
DNSMASQCONF="${PREFIX}/etc/dnsmasq-resolvconf.conf"
printf "${NEWRESOLV}" > "${DNSMASQRESOLV}"
fi
-if [ "${RELOAD}" = "yes" ]; then
- if [ -x "${PREFIX}"/etc/init.d/dnsmasq ]; then
- /etc/init.d/dnsmasq --quiet --nodeps conditionalrestart
- elif [ -x "${PREFIX}"/etc/rc.d/dnsmasq ]; then
- "${PREFIX}"/etc/rc.d/dnsmasq restart
- fi
-fi
-
+[ "${RELOAD}" = "yes" ] && resolvconf -s dnsmasq restart
if [ "${DBUS}" = "yes" ]; then
- if [ "${RELOAD}" != "yes" ]; then
- if [ -x "${PREFIX}"/etc/init.d/dnsmasq ]; then
- /etc/init.d/dnsmasq --quiet reload
- elif [ -x "${PREFIX}"/etc/rc.d/dnsmasq ]; then
- "${PREFIX}"/etc/rc.d/dnsmasq reload
- fi
- fi
+ [ "${RELOAD}" != "yes" ] && resolvconf -s dnsmasq reload
# Send even if emtpy so old servers are cleared
dbus-send --system --dest=uk.org.thekelleys.dnsmasq \
/uk/org/thekelleys/dnsmasq uk.org.thekelleys.SetServers \