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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# scMerlin

## v2.5.48
### Updated on 2025-Dec-15
### Updated on 2026-Feb-18

## About
scMerlin allows you to easily control the most common services/scripts on your router. scMerlin also augments your router's WebUI with a Sitemap and dynamic submenus for the main left menu of Asuswrt-Merlin.
Expand Down
37 changes: 32 additions & 5 deletions scmerlin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
## Forked from: https://github.com/jackyaz/scMerlin ##
## ##
######################################################
# Last Modified: 2025-Dec-15
# Last Modified: 2026-Feb-18
#-----------------------------------------------------

########## Shellcheck directives ###########
Expand All @@ -34,7 +34,7 @@ readonly SCRIPT_NAME="scMerlin"
readonly SCRIPT_NAME_LOWER="$(echo "$SCRIPT_NAME" | tr 'A-Z' 'a-z' | sed 's/d//')"
readonly SCM_VERSION="v2.5.48"
readonly SCRIPT_VERSION="v2.5.48"
readonly SCRIPT_VERSTAG="25121520"
readonly SCRIPT_VERSTAG="26021800"
SCRIPT_BRANCH="develop"
SCRIPT_REPO="https://raw.githubusercontent.com/AMTM-OSR/$SCRIPT_NAME/$SCRIPT_BRANCH"
readonly SCRIPT_DIR="/jffs/addons/$SCRIPT_NAME_LOWER.d"
Expand Down Expand Up @@ -102,6 +102,9 @@ readonly branchxStr_TAG="[Branch: $SCRIPT_BRANCH]"
readonly versionDev_TAG="${SCRIPT_VERSION}_${SCRIPT_VERSTAG}"
readonly versionMod_TAG="$SCRIPT_VERSION on $ROUTER_MODEL"

# To support automatic script updates from AMTM #
doScriptUpdateFromAMTM=true

##-------------------------------------##
## Added by Martinski W. [2025-May-17] ##
##-------------------------------------##
Expand Down Expand Up @@ -1167,9 +1170,11 @@ Update_Version()
localver="$(echo "$updatecheckresult" | cut -f2 -d',')"
serverver="$(echo "$updatecheckresult" | cut -f3 -d',')"

if [ "$isupdate" = "version" ]; then
if [ "$isupdate" = "version" ]
then
Print_Output true "New version of $SCRIPT_NAME available - $serverver" "$PASS"
elif [ "$isupdate" = "md5" ]; then
elif [ "$isupdate" = "md5" ]
then
Print_Output true "MD5 hash of $SCRIPT_NAME does not match - hotfix available - $serverver" "$PASS"
fi

Expand Down Expand Up @@ -1246,6 +1251,23 @@ Update_Version()
fi
}

##-------------------------------------##
## Added by Martinski W. [2026-Feb-18] ##
##-------------------------------------##
ScriptUpdateFromAMTM()
{
if ! "$doScriptUpdateFromAMTM"
then
printf "Automatic script updates via AMTM are currently disabled.\n\n"
return 1
fi
if [ $# -gt 0 ] && [ "$1" = "check" ]
then return 0
fi
Update_Version force unattended
return "$?"
}

##----------------------------------------##
## Modified by Martinski W. [2025-Feb-11] ##
##----------------------------------------##
Expand Down Expand Up @@ -3950,7 +3972,7 @@ then
fi

##----------------------------------------##
## Modified by Martinski W. [2025-Oct-19] ##
## Modified by Martinski W. [2026-Feb-18] ##
##----------------------------------------##
case "$1" in
install)
Expand Down Expand Up @@ -4225,6 +4247,11 @@ case "$1" in
Update_Version force
exit 0
;;
amtmupdate)
shift
ScriptUpdateFromAMTM "$@"
exit "$?"
;;
postupdate)
Create_Dirs
Create_Symlinks
Expand Down