Skip to content

Commit c94c253

Browse files
Update MerlinAU.sh
1 parent 1325730 commit c94c253

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

MerlinAU.sh

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,27 +2159,24 @@ _CheckFor_WebGUI_Page_()
21592159
if "$mountWebGUI_OK" && \
21602160
[ "$(_Check_WebGUI_Page_Exists_)" = "NONE" ]
21612161
then
2162-
updatedWebUIPage=false
2163-
# Only try to download if the local .asp file does NOT exist:
2164-
if [ ! -f "$SCRIPT_WEB_ASP_FILE" ]
2165-
then
2166-
if _CurlFileDownload_ "$SCRIPT_WEB_ASP_FILE" "$SCRIPT_WEB_ASP_PATH"
2167-
then
2168-
chmod 664 "$SCRIPT_WEB_ASP_PATH"
2169-
if "$updatedWebUIPage"
2170-
then
2171-
theWebPage="$(_GetWebUIPage_ "$SCRIPT_WEB_ASP_PATH")"
2172-
if [ -n "$theWebPage" ] && [ "$theWebPage" != "NONE" ]
2173-
then
2174-
sed -i "/url: \"$theWebPage\", tabName: \"$SCRIPT_NAME\"/d" "$TEMP_MENU_TREE"
2175-
rm -f "${SHARED_WEB_DIR}/$theWebPage"
2176-
rm -f "${SHARED_WEB_DIR}/$(echo "$theWebPage" | cut -f1 -d'.').title"
2177-
fi
2178-
_Mount_WebUI_
2162+
updatedWebUIPage=false
2163+
# Only try to download if the local .asp file does NOT exist:
2164+
if [ ! -f "$SCRIPT_WEB_ASP_FILE" ]
2165+
then
2166+
if _CurlFileDownload_ "$SCRIPT_WEB_ASP_FILE" "$SCRIPT_WEB_ASP_PATH"
2167+
then
2168+
chmod 664 "$SCRIPT_WEB_ASP_PATH"
2169+
theWebPage="$(_GetWebUIPage_ "$SCRIPT_WEB_ASP_PATH")"
2170+
if [ -n "$theWebPage" ] && [ "$theWebPage" != "NONE" ]
2171+
then
2172+
sed -i "/url: \"$theWebPage\", tabName: \"$SCRIPT_NAME\"/d" "$TEMP_MENU_TREE"
2173+
rm -f "${SHARED_WEB_DIR}/$theWebPage"
2174+
rm -f "${SHARED_WEB_DIR}/$(echo "$theWebPage" | cut -f1 -d'.').title"
21792175
fi
2176+
_Mount_WebUI_
21802177
else
21812178
Say "${REDct}**ERROR**${NOct}: Unable to download latest WebUI ASP file for $SCRIPT_NAME."
2182-
fi
2179+
fi
21832180
else
21842181
_Mount_WebUI_
21852182
fi

0 commit comments

Comments
 (0)