@Jack Yaz could you not start taildns when logging is disabled?
I modified my files thus:
/jffs/scripts/uiDivStats, line 1288:
Code:
dnsmasq)
if grep 'log-facility' /etc/dnsmasq.conf; then
Print_Output "true" "dnsmasq has restarted, restarting taildns" "$PASS"
/opt/etc/init.d/S90taildns stop >/dev/null 2>&1
sleep 5
/opt/etc/init.d/S90taildns start >/dev/null 2>&1
else
/opt/etc/init.d/S90taildns stop >/dev/null 2>&1
Print_Output "true" "dnsmasq has restarted, Dnsmasq logging is disabled, stopped taildns" "$PASS"
fi
exit 0
;;
And /opt/bin/taildns:
Code:
#!/bin/sh
#shellcheck disable=SC2039
trap '' SIGHUP
if [ ! -f /opt/bin/pkill ]; then
opkg update
opkg install procps-ng-pkill
fi
if grep 'log-facility' /etc/dnsmasq.conf; then
/jffs/addons/uiDivStats.d/taildns.d/taildnstotal &
while true; do
sleep 5
if [ "$(pidof taildnstotal | wc -w)" -lt 2 ]; then
logger -t "uiDivStats" "taildns dead, restarting..."
killall -q taildnstotal
/opt/bin/pkill -f "tail -F /opt/var/log/dnsmasq.log /opt/var/log/dnsmasq.log3"
sleep 5
/jffs/addons/uiDivStats.d/taildns.d/taildnstotal &
logger -t "uiDivStats" "taildns restarted"
fi
done
else
logger -t "uiDivStats" "taildns not started, Dnsmasq logging is disabled"
fi
Edit: You may have to add more code elsewhere, I just changed the obvious files to me