Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
#
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
# Last Modified: 2026-Jun-23
# Last Modified: 2026-Jul-30
###################################################################
set -u

## Set version for each Production Release ##
readonly SCRIPT_VERSION=1.6.6
readonly SCRIPT_VERSTAG="26073010"
readonly SCRIPT_VERSTAG="26073018"
readonly SCRIPT_NAME="MerlinAU"
## Set to "master" for Production Releases ##
SCRIPT_BRANCH="dev"
Expand Down Expand Up @@ -8852,24 +8852,48 @@ _Toggle_FW_UpdateCheckSetting_()
}

##----------------------------------------##
## Modified by Martinski W. [2025-Feb-22] ##
## Modified by Martinski W. [2026-Jul-30] ##
##----------------------------------------##
_RemoveCronJobsFromAddOns_()
{
eval $cronListCmd | grep -E "$cronJobsRegEx1|$cronJobsRegEx2|$cronJobsRegEx3|cronJobsRegEx4|$cronJobsRegEx5|$cronJobsRegEx6" > "$addonCronJobList"
eval $cronListCmd | grep -E "$cronJobsRegEx1|$cronJobsRegEx2|$cronJobsRegEx3|$cronJobsRegEx4|$cronJobsRegEx5|$cronJobsRegEx6" > "$addonCronJobList"
if [ ! -s "$addonCronJobList" ]
then
rm -f "$addonCronJobList"
Say "Cron jobs from 3rd-party add-ons were not found."
return 1
fi

_RemoveCronJobWithTimeout_()
{
local cruProcID cruProcOK=false
local waitSecsMAX=10 waitSecsCNT=0

cru d "$1" & cruProcID="$!"

while [ "$waitSecsCNT" -lt "$waitSecsMAX" ]
do
sleep 1
waitSecsCNT="$((waitSecsCNT + 1))"
if ! kill -EXIT "$cruProcID" 2>/dev/null
then cruProcOK=true ; break
fi
done

if kill -EXIT "$cruProcID" 2>/dev/null
then
kill -9 "$cruProcID"
Say "Wait Timeout [$waitSecsMAX secs] for CRU command expired."
fi
}

local cronJobCount=0 cronJobIDx cronJobCMD

while read -r cronJobLINE
do
if [ -z "$cronJobLINE" ] || echo "$cronJobLINE" | grep -qE "^[[:blank:]]*#"
then continue ; fi
then continue
fi
cronJobCount="$((cronJobCount + 1))"

[ "$cronJobCount" -eq 1 ] && \
Expand All @@ -8881,7 +8905,7 @@ _RemoveCronJobsFromAddOns_()

if [ -n "$cronJobIDx" ]
then
cru d "$cronJobIDx" ; sleep 1
_RemoveCronJobWithTimeout_ "$cronJobIDx"
if eval $cronListCmd | grep -qE "#${cronJobIDx}#$"
then Say "**ERROR**: Failed to remove cron job [$cronJobIDx]."
else Say "Cron job [$cronJobIDx] was removed successfully."
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# MerlinAU - AsusWRT-Merlin Firmware Auto Updater

## v1.6.5
## 2026-June-23
## v1.6.6
## 2026-Jul-30

## WebUI:
<img width="775" height="1640" alt="image" src="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/user-attachments/assets/846f889b-b39f-4ffe-a37a-8892ad9b2f7f" />
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.5
1.6.6