From 8184dc1d851029f8f419c259954a8ce616b4bcba Mon Sep 17 00:00:00 2001 From: CodeRoK7 <58553260+CodeRoK7@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:03:43 +0500 Subject: [PATCH] Check autorun script configure_zaprets.sh --- awg_config.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/awg_config.sh b/awg_config.sh index 79f6ccd..d3c73d7 100644 --- a/awg_config.sh +++ b/awg_config.sh @@ -342,9 +342,13 @@ printf "\033[32;1mStop and disabled service 'youtubeUnblock' and 'ruantiblock'. manage_package "youtubeUnblock" "disable" "stop" manage_package "ruantiblock" "disable" "stop" -grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root > /etc/crontabs/temp -cp -f "/etc/crontabs/temp" "/etc/crontabs/root" -rm -f "/etc/crontabs/temp" +str=$(grep -i "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root) +if [ ! -z "$str" ] +then + grep -v "0 4 \* \* \* wget -O - $URL/configure_zaprets.sh | sh" /etc/crontabs/root > /etc/crontabs/temp + cp -f "/etc/crontabs/temp" "/etc/crontabs/root" + rm -f "/etc/crontabs/temp" +fi printf "\033[32;1mRestart firewall and network...\033[0m\n" service firewall restart