From 380c8e44fe7f5a750b12fca22485157a5195cae3 Mon Sep 17 00:00:00 2001 From: CodeRoK7 <58553260+CodeRoK7@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:05:03 +0500 Subject: [PATCH] Check autorun script configure_zaprets.sh --- off_configure_zaprets.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/off_configure_zaprets.sh b/off_configure_zaprets.sh index baf7919..db0bc44 100644 --- a/off_configure_zaprets.sh +++ b/off_configure_zaprets.sh @@ -27,8 +27,12 @@ service odhcpd restart echo "Remove cron task auto run script configure zaprets.." -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;1mOff configured completed...\033[0m"