Skip to content
Merged
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
41 changes: 14 additions & 27 deletions MerlinAU.sh
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,14 @@ keepConfigFile=false
bypassPostponedDays=false
runLoginCredentialsTest=false

##---------------------------------------##
## Added by ExtremeFiretop [2025-Apr-07] ##
##---------------------------------------##
MerlinAUInstall=$(grep -F '#MerlinAU#' /jffs/scripts/services-start)
if [ -z "$MerlinAUInstall" ] && tty >/dev/null 2>&1; then
set "install"
fi

# Main LAN Network Info #
readonly myLAN_HostName="$(nvram get lan_hostname)"
readonly mainLAN_IFname="$(nvram get lan_ifname)"
Expand Down Expand Up @@ -2151,35 +2159,14 @@ _Mount_WebUI_()
return 0
}

##------------------------------------------##
## Modified by ExtremeFiretop [2025-Apr-07] ##
##------------------------------------------##
##-------------------------------------##
## Added by Martinski W. [2025-Feb-12] ##
##-------------------------------------##
_CheckFor_WebGUI_Page_()
{
if "$mountWebGUI_OK" && \
[ "$(_Check_WebGUI_Page_Exists_)" = "NONE" ]
then
# Only try to download if the local .asp file does NOT exist:
if [ ! -f "$SCRIPT_WEB_ASP_FILE" ]
then
if _CurlFileDownload_ "$SCRIPT_WEB_ASP_FILE" "$SCRIPT_WEB_ASP_PATH"
then
chmod 664 "$SCRIPT_WEB_ASP_PATH"
theWebPage="$(_GetWebUIPage_ "$SCRIPT_WEB_ASP_PATH")"
if [ -n "$theWebPage" ] && [ "$theWebPage" != "NONE" ]
then
sed -i "/url: \"$theWebPage\", tabName: \"$SCRIPT_NAME\"/d" "$TEMP_MENU_TREE"
rm -f "${SHARED_WEB_DIR}/$theWebPage"
rm -f "${SHARED_WEB_DIR}/$(echo "$theWebPage" | cut -f1 -d'.').title"
fi
_Mount_WebUI_
else
Say "${REDct}**ERROR**${NOct}: Unable to download latest WebUI ASP file for $SCRIPT_NAME."
fi
else
_Mount_WebUI_
fi
fi
if "$mountWebGUI_OK" && \
[ "$(_Check_WebGUI_Page_Exists_)" = "NONE" ]
then _Mount_WebUI_ ; fi
}

##----------------------------------------##
Expand Down