- #hr; echo dnsmasq is $(systemctl is-active dnsmasq)
- f=/var/run/dnsmasq/resolv.conf
- hr; echo $f:; ccat $f
- hr; m grr '^ *(servers-file|server) *=|^ *no-resolv *$' /etc/dnsmasq.conf /etc/dnsmasq.d
- f=/etc/dnsmasq-servers.conf
- hr; echo $f:; ccat $f
+ if systemctl is-enabled dnsmasq &>/dev/null || [[ $(systemctl is-active dnsmasq ||:) != inactive ]]; then
+ # this will fail is dnsmasq is failed
+ hr; m ser status dnsmasq | cat || :
+ f=/var/run/dnsmasq/resolv.conf
+ hr; echo $f:; ccat $f
+ hr; m grr '^ *(servers-file|server) *=|^ *no-resolv *$' /etc/dnsmasq.conf /etc/dnsmasq.d
+ f=/etc/dnsmasq-servers.conf
+ hr; echo $f:; ccat $f
+ fi
+ if systemctl is-enabled systemd-resolved &>/dev/null || [[ $(systemctl is-active systemd-resolved ||:) != inactive ]]; then
+ hr; m ser status systemd-resolved | cat || :
+ hr; m systemd-resolve --status
+ fi
+