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
4 changes: 2 additions & 2 deletions .github/workflows/Create-NewReleases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v7.0.0
uses: actions/checkout@v7.0.1
with:
fetch-depth: 0
ref: 'main' # Ensure we're tagging the main branch after the merge
Expand Down Expand Up @@ -85,7 +85,7 @@ jobs:
git push origin ${{ steps.nextver.outputs.tag }}

- name: Create Release with Automated Release Notes
uses: softprops/action-gh-release@v3.0.1
uses: softprops/action-gh-release@v3.0.2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ steps.nextver.outputs.tag }}
Expand Down
55 changes: 41 additions & 14 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-Aug-16
###################################################################
set -u

## Set version for each Production Release ##
readonly SCRIPT_VERSION=1.6.5
readonly SCRIPT_VERSTAG="26062300"
readonly SCRIPT_VERSION=1.6.6
readonly SCRIPT_VERSTAG="26081603"
readonly SCRIPT_NAME="MerlinAU"
## Set to "master" for Production Releases ##
SCRIPT_BRANCH="dev"
Expand Down Expand Up @@ -1648,7 +1648,7 @@ Get_Custom_Setting()
}

##----------------------------------------##
## Modified by Martinski W. [2025-Jan-20] ##
## Modified by Martinski W. [2026-Aug-16] ##
##----------------------------------------##
Update_Custom_Settings()
{
Expand Down Expand Up @@ -1678,7 +1678,8 @@ Update_Custom_Settings()
then
if [ "$setting_value" != "$(grep "^$setting_type" "$CONFIG_FILE" | cut -f2 -d' ')" ]
then
sed -i "s/^$setting_type.*/$setting_type $setting_value/" "$CONFIG_FILE"
fixedVal="$(echo "$setting_value" | sed 's/[\/&]/\\&/g')"
sed -i "s/^${setting_type}.*/$setting_type $fixedVal/" "$CONFIG_FILE"
fi
else
echo "$setting_type $setting_value" >> "$CONFIG_FILE"
Expand Down Expand Up @@ -4490,9 +4491,9 @@ _CheckForMinimumModelSupport_()
"$routerModelCheckFailed" && return 1 || return 0
}

##-------------------------------------##
## Added by Martinski W. [2026-Jan-01] ##
##-------------------------------------##
##------------------------------------------##
## Modified by ExtremeFiretop [2026-Jul-30] ##
##------------------------------------------##
_DoMainRouterLogin_()
{
if [ $# -lt 3 ] || [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ]
Expand All @@ -4511,7 +4512,8 @@ _DoMainRouterLogin_()
-H 'Content-Type: application/x-www-form-urlencoded' \
-H "Origin: ${routerURL}/" \
-H 'Connection: keep-alive' \
--data-raw "group_id=&action_mode=&action_script=&action_wait=5&current_page=Main_Login.asp&next_page=index.asp&login_authorization=$credsENC" \
--data-raw "group_id=&action_mode=&action_script=&action_wait=5&current_page=Main_Login.asp&next_page=index.asp" \
--data-urlencode "login_authorization=$credsENC" \
--cookie-jar "$cookieFile")"
curlCode="$?"

Expand Down Expand Up @@ -5381,7 +5383,8 @@ _DoMeshNodeLogin_()
-H 'Content-Type: application/x-www-form-urlencoded' \
-H "Origin: ${nodeURL}" \
-H 'Connection: keep-alive' \
--data-raw "group_id=&action_mode=&action_script=&action_wait=5&current_page=Main_Login.asp&next_page=index.asp&login_authorization=$credsENC" \
--data-raw "group_id=&action_mode=&action_script=&action_wait=5&current_page=Main_Login.asp&next_page=index.asp" \
--data-urlencode "login_authorization=$credsENC" \
--cookie-jar "$cookieFile" \
--max-time 3 >/dev/null 2>&1

Expand Down Expand Up @@ -8850,24 +8853,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 @@ -8879,7 +8906,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
12 changes: 6 additions & 6 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-Aug-16

## WebUI:
<img width="775" height="1640" alt="image" src="https://github.com/user-attachments/assets/846f889b-b39f-4ffe-a37a-8892ad9b2f7f" />
Expand Down Expand Up @@ -168,10 +168,10 @@ The script can be run using the below options:
## Use this Automatic F/W Update script at your own discretion. By using this script you assume all risks associated with updating a router to a new firmware version.

## Star History
<a href="https://www.star-history.com/#ExtremeFiretop/MerlinAutoUpdate-Router&Date">
<a href="https://www.star-history.com/?repos=ExtremeFiretop%2FMerlinAutoUpdate-Router&type=date&legend=bottom-right">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=Date&theme=dark" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=Date" />
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=Date" />
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/chart?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=date&theme=dark&legend=bottom-right&sealed_token=D_Q2Fw266xY4x4aXW58nikdwO4KETwObM4kq4bYECTuVgLhDXEr-fDzt6kL7jjTKb8PWgHlJgT5KRk9FF2DYvWmtVYiSoE0E67jkeR7oGV2MzU9abVuq7A" />
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/chart?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=date&legend=bottom-right&sealed_token=D_Q2Fw266xY4x4aXW58nikdwO4KETwObM4kq4bYECTuVgLhDXEr-fDzt6kL7jjTKb8PWgHlJgT5KRk9FF2DYvWmtVYiSoE0E67jkeR7oGV2MzU9abVuq7A" />
<img alt="Star History Chart" src="https://api.star-history.com/chart?repos=ExtremeFiretop/MerlinAutoUpdate-Router&type=date&legend=bottom-right&sealed_token=D_Q2Fw266xY4x4aXW58nikdwO4KETwObM4kq4bYECTuVgLhDXEr-fDzt6kL7jjTKb8PWgHlJgT5KRk9FF2DYvWmtVYiSoE0E67jkeR7oGV2MzU9abVuq7A" />
</picture>
</a>
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