#!/bin/zsh
STATS_PERIOD=2m
while (true) { pkill --signal USR1 --oldest --full /usr/sbin/dnsmasq; sleep ${STATS_PERIOD} } &

rm -f /tmp/dnsmasq_log_pipe
mkfifo /tmp/dnsmasq_log_pipe

{ journalctl -fu dnsmasq_10.2.service > /tmp/dnsmasq_log_pipe } &

mtail -port 9991 -logtostderr -logs /tmp/dnsmasq_log_pipe  -progs /opt/dnsmasq/10.2
#-disable_fsnotify -poll_interval ${STATS_PERIOD}