From e59ef6dd6f233b4ae5e95825a3e5bcf8d600b729 Mon Sep 17 00:00:00 2001 From: Ivan K Date: Thu, 1 May 2025 17:57:51 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style(podkop):=20remove=20unnece?= =?UTF-8?q?ssary=20sed=20commands=20in=20global=5Fcheck?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- podkop/files/usr/bin/podkop | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/podkop/files/usr/bin/podkop b/podkop/files/usr/bin/podkop index 3908f50..e36c365 100755 --- a/podkop/files/usr/bin/podkop +++ b/podkop/files/usr/bin/podkop @@ -2175,7 +2175,7 @@ global_check() { if grep -E "^nameserver\s+([0-9]{1,3}\.){3}[0-9]{1,3}" "$RESOLV_CONF" | grep -vqE "127\.0\.0\.1|0\.0\.0\.0"; then print_global "❌ /etc/resolv.conf contains external nameserver:" - cat /etc/resolv.conf | sed 's/^/ /' + cat /etc/resolv.conf echo "" else print_global "✅ /etc/resolv.conf - OK" @@ -2187,18 +2187,18 @@ global_check() { if [ "$cachesize" != "0" ] || [ "$noresolv" != "1" ] || [ "$server" != "127.0.0.42" ]; then print_global "❌ DHCP configuration differs from template:" - awk '/^config /{p=($2=="dnsmasq")} p' /etc/config/dhcp | sed 's/^/ /' + awk '/^config /{p=($2=="dnsmasq")} p' /etc/config/dhcp elif [ "$(uci get podkop.main.dont_touch_dhcp 2>/dev/null)" = "1" ]; then print_global "⚠️ dont_touch_dhcp is enabled:" - awk '/^config /{p=($2=="dnsmasq")} p' /etc/config/dhcp | sed 's/^/ /' + awk '/^config /{p=($2=="dnsmasq")} p' /etc/config/dhcp else print_global "✅ DHCP configuration - OK" fi if ! pgrep -f "sing-box" >/dev/null; then - print_global "❌ sing-box process - not running" + print_global "❌ sing-box is not running" else - print_global "✅ sing-box process - running" + print_global "✅ sing-box is running" fi print_global "━━━━━━━━━━━━━━━━━━━━━━━━━━━" @@ -2206,7 +2206,7 @@ global_check() { if ! nft list table inet PodkopTable >/dev/null 2>&1; then print_global "❌ PodkopTable not found" else - nft list table inet PodkopTable | sed 's/^/ /' + nft list table inet PodkopTable fi print_global "━━━━━━━━━━━━━━━━━━━━━━━━━━━" @@ -2229,7 +2229,7 @@ global_check() { print } } - ' /etc/config/network | sed 's/^/ /' + ' /etc/config/network else print_global "❌ WAN configuration not found" fi