From 15c7f87a7953ecf070bd6269692fa144b57fdfae Mon Sep 17 00:00:00 2001 From: pedro Date: Fri, 30 May 2025 10:52:15 +0200 Subject: [PATCH] others: adblock-v2: improve display in GUI --- release/src-rt-6.x.4708/router/others/adblock-v2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/src-rt-6.x.4708/router/others/adblock-v2 b/release/src-rt-6.x.4708/router/others/adblock-v2 index 3f6dbe7b6a..1e243ebbdc 100755 --- a/release/src-rt-6.x.4708/router/others/adblock-v2 +++ b/release/src-rt-6.x.4708/router/others/adblock-v2 @@ -734,11 +734,11 @@ Ram Used/Cache/Buffer / Total = ${rampu}% ~ $(echo $ramu | number)/$(echo $ramc
Dnsmasq running = $(echo $([ -f "/var/run/dnsmasq.pid" ] && echo "Yes 🆗" || echo "no ⛔")) Dnsmasq restarts today = $(echo " $restarts ") -Dnsmasq owner = $(ps | grep -q '[d]nsmasq.*async$' && [ $(ps | grep '[d]nsmasq.*async$' | awk '{print $2}') == "root" ] && echo "root ️⛔ " || echo "nobody 🆗" ) +Dnsmasq owner = $(ps | grep -q '[d]nsmasq.*async$' && [ "$(ps | grep '[d]nsmasq.*async$' | awk '{print $2}')" == "root" ] && echo "root ️⛔ " || echo "nobody 🆗" ) Dnsmasq restart time = $([ -f $DNS_TIME ] && echo $(cat $DNS_TIME) || echo "N/A") Adblock calls today = $(grep -E $(date +%b)" "+$(date +%d|sed 's/^0*//') /var/log/messages | grep "Kick off" | wc -l ) Adblock config loaded = $(echo $(grep -q 'conf-file=/etc/dnsmasq.adblock' /etc/dnsmasq.conf && echo "Yes 🆗" || echo "No ⛔")) -Adblock script activity = $(echo $([ -f "/var/run/adblock.pid" ] && { [ -f ${VRFY} ] && echo "👁️ Checking..." || echo "🌀 Loading... $([ -s $TM ] && { wc -l < $TM | number ;}) domains / $([ -s $TM ] && { wc -c < $TM | number ;} ) Bytes " ;} || echo "idle"))" +Adblock script activity = $(echo $([ -f "/var/run/adblock.pid" ] && { [ -f ${VRFY} ] && echo "👁️ Checking..." || echo "🌀 Loading... $([ -s $TM ] && { wc -l < $TM | number ;}) domains / $([ -s $TM ] && { wc -c < $TM | number ;} ) Bytes " ;} || echo "idle"))" [ -s "$FINAL" -a $(grep 'conf-file=/etc/dnsmasq.adblock' /etc/dnsmasq.conf | wc -l) -eq 1 ] && { filp=$(($(wc -c < $FINAL) * 100 / $([ $(echo $sizeLimit | wc -c 2>/dev/null ) -gt 0 ] && echo $sizeLimit || echo 99999999))) lre=$(grep 'error' $ADHELPER | awk '{print $2}')