Skip to content

Commit 2bb97cd

Browse files
Merge pull request #415 from Martinski4GitHub/WebFun
Improvements & Enhancements
2 parents e472daf + 7121be2 commit 2bb97cd

File tree

2 files changed

+63
-33
lines changed

2 files changed

+63
-33
lines changed

MerlinAU.asp

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
<script language="JavaScript" type="text/javascript">
3030
3131
/**----------------------------**/
32-
/** Last Modified: 2025-Feb-21 **/
32+
/** Last Modified: 2025-Feb-22 **/
3333
/** Intended for 1.4.0 Release **/
3434
/**----------------------------**/
3535
@@ -1062,6 +1062,8 @@ const emailNotifyHint = 'The Email Notifications option requires the AMTM email
10621062
10631063
const autoBackupsHint = 'The Automatic Backups option requires the BACKUPMON script to be installed on the router.';
10641064
1065+
const addonAutoUpdatesHint = 'The daily schedule for automatic updates of MerlinAU is always configured to be 15 minutes *before* the scheduled time for automatic F/W Update checks.';
1066+
10651067
const ROG_BuildTypeMsg = 'The ROG build type preference will apply only if a compatible ROG firmware image is available. Otherwise, the Pure Non-ROG build will be used instead.';
10661068
10671069
const TUF_BuildTypeMsg = 'The TUF build type preference will apply only if a compatible TUF firmware image is available. Otherwise, the Pure Non-TUF build will be used instead.';
@@ -1091,6 +1093,9 @@ function ShowHintMsg (formField)
10911093
case 'AUTOMATIC_BACKUPS':
10921094
theHintMsg = autoBackupsHint;
10931095
break;
1096+
case 'ADDON_AUTO_UPDATES':
1097+
theHintMsg = addonAutoUpdatesHint;
1098+
break;
10941099
case 'EMAIL_NOTIFICATION':
10951100
theHintMsg = emailNotifyHint;
10961101
break;
@@ -1799,22 +1804,22 @@ function SaveAdvancedConfig()
17991804
if (fwUpdateDirectory)
18001805
{ advanced_settings.FW_New_Update_ZIP_Directory_Path = fwUpdateDirectory.value || '/tmp/mnt/USB1'; }
18011806
1802-
// 3) Tailscale/ZeroTier VPN Access - only if not disabled
1807+
// 3) Tailscale/ZeroTier VPN Access - only if not disabled //
18031808
let tailscaleVPNEnabled = document.getElementById('tailscaleVPNEnabled');
18041809
if (tailscaleVPNEnabled && !tailscaleVPNEnabled.disabled)
18051810
{ advanced_settings.Allow_Updates_OverVPN = tailscaleVPNEnabled.checked ? 'ENABLED' : 'DISABLED'; }
18061811
1807-
// 4) Auto-Updates for Script - only if not disabled
1812+
// 4) Automatic Updates for Script - only if not disabled //
18081813
let script_AutoUpdate_Check = document.getElementById('Script_AutoUpdate_Check');
18091814
if (script_AutoUpdate_Check && !script_AutoUpdate_Check.disabled)
18101815
{ advanced_settings.Allow_Script_Auto_Update = script_AutoUpdate_Check.checked ? 'ENABLED' : 'DISABLED'; }
18111816
1812-
// 5) Beta-to-Release Updates - only if not disabled
1817+
// 5) Beta-to-Release Updates - only if not disabled //
18131818
let betaToReleaseUpdatesEnabled = document.getElementById('betaToReleaseUpdatesEnabled');
18141819
if (betaToReleaseUpdatesEnabled && !betaToReleaseUpdatesEnabled.disabled)
18151820
{ advanced_settings.FW_Allow_Beta_Production_Up = betaToReleaseUpdatesEnabled.checked ? 'ENABLED' : 'DISABLED'; }
18161821
1817-
// 6) Auto-Backup - only if not disabled
1822+
// 6) Automatic Backups - only if not disabled //
18181823
let autobackupEnabled = document.getElementById('autobackupEnabled');
18191824
if (autobackupEnabled && !autobackupEnabled.disabled)
18201825
{ advanced_settings.FW_Auto_Backupmon = autobackupEnabled.checked ? 'ENABLED' : 'DISABLED'; }
@@ -2133,7 +2138,13 @@ function initializeCollapsibleSections()
21332138
<div>&nbsp;</div>
21342139
<div class="formfonttitle" id="headerTitle" style="text-align:center;">MerlinAU</div>
21352140
<div style="margin:10px 0 10px 5px;" class="splitLine"></div>
2136-
<div class="formfontdesc">This is the MerlinAU add-on integrated into the router WebUI.</div>
2141+
<div class="formfontdesc">This is the MerlinAU add-on integrated into the router WebUI
2142+
<span style="margin-left:8px;" id="WikiURL"">[
2143+
<a style="font-weight:bolder; text-decoration:underline; cursor:pointer;"
2144+
href="https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/wiki"
2145+
title="Go to MerlinAU Wiki page" target="_blank">Wiki</a> ]
2146+
</span>
2147+
</div>
21372148
<div style="line-height:10px;">&nbsp;</div>
21382149
21392150
<!-- Parent Table to Arrange Firmware and Settings Status Side by Side -->
@@ -2218,7 +2229,7 @@ function initializeCollapsibleSections()
22182229
<td style="padding: 4px; font-weight: bolder;" id="tailscaleVPNAccessStatus">Disabled</td>
22192230
</tr>
22202231
<tr>
2221-
<td style="padding: 4px; width: 180px;"><strong>Auto-Backup Enabled:</strong></td>
2232+
<td style="padding: 4px; width: 180px;"><strong>Automatic Backups:</strong></td>
22222233
<td style="padding: 4px; font-weight: bolder;" id="autobackupEnabledStatus">Disabled</td>
22232234
</tr>
22242235
<tr>
@@ -2465,7 +2476,12 @@ function initializeCollapsibleSections()
24652476
<td><input type="checkbox" id="autobackupEnabled" name="autobackupEnabled" /></td>
24662477
</tr>
24672478
<tr>
2468-
<td style="text-align: left;"><label for="Script_AutoUpdate_Check">Enable Auto-Updates for MerlinAU</label></td>
2479+
<td style="text-align: left;">
2480+
<label for="Script_AutoUpdate_Check">
2481+
<a class="hintstyle" name="ADDON_AUTO_UPDATES" href="javascript:void(0);"
2482+
onclick="ShowHintMsg(this);">Enable Auto-Updates for MerlinAU</a>
2483+
</label>
2484+
</td>
24692485
<td>
24702486
<input type="checkbox" id="Script_AutoUpdate_Check" name="Script_AutoUpdate_Check"/>
24712487
<span id="Script_AutoUpdate_SchedText" style="margin-left:10px; display:none; font-size: 12px; font-weight: bolder;"></span>

MerlinAU.sh

Lines changed: 39 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Original Creation Date: 2023-Oct-01 by @ExtremeFiretop.
66
# Official Co-Author: @Martinski W. - Date: 2023-Nov-01
7-
# Last Modified: 2025-Feb-21
7+
# Last Modified: 2025-Feb-22
88
###################################################################
99
set -u
1010

@@ -500,52 +500,62 @@ _ShowLogo_()
500500
echo -e "${NOct}"
501501
}
502502

503-
##---------------------------------------##
504-
## Added by ExtremeFiretop [2024-Jul-03] ##
505-
##---------------------------------------##
503+
##----------------------------------------##
504+
## Modified by Martinski W. [2025-Feb-22] ##
505+
##----------------------------------------##
506506
_ShowAbout_()
507507
{
508508
clear
509509
_ShowLogo_
510510
cat <<EOF
511511
About
512-
$SCRIPT_NAME is a tool for automating firmware updates on AsusWRT Merlin,
513-
ensuring your router stays up-to-date with the latest features and security
514-
patches. It simplifies the update process by automatically checking for,
515-
downloading, and applying new firmware versions.
516-
Developed by ExtremeFiretop and Martinski W.
512+
$SCRIPT_NAME is a tool for automating firmware updates on AsusWRT-Merlin,
513+
ensuring your router stays up-to-date with the latest features and
514+
security patches. It greatly simplifies the firmware update process
515+
by automatically checking for, downloading, and applying the latest
516+
firmware version update that is currently available.
517+
[Developed by ExtremeFiretop and Martinski W.]
518+
517519
License
518520
$SCRIPT_NAME is free to use under the GNU General Public License
519521
version 3 (GPL-3.0) https://opensource.org/licenses/GPL-3.0
522+
520523
Help & Support
521524
https://www.snbforums.com/threads/merlinau-the-ultimate-firmware-auto-updater-addon.88577/
525+
526+
Wiki page:
527+
https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/wiki
528+
522529
Source code
523530
https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router
524531
EOF
525532
echo
526533
_DoExit_ 0
527534
}
528535

529-
##------------------------------------------##
530-
## Modified by ExtremeFiretop [2024-Nov-18] ##
531-
##------------------------------------------##
536+
##----------------------------------------##
537+
## Modified by Martinski W. [2025-Feb-22] ##
538+
##----------------------------------------##
532539
_ShowHelp_()
533540
{
534541
clear
535542
_ShowLogo_
536543
cat <<EOF
537544
Available commands:
538-
${SCRIPT_NAME}.sh about explains functionality
539-
${SCRIPT_NAME}.sh help display available commands
540-
${SCRIPT_NAME}.sh checkupdates check for available MerlinAU script updates
541-
${SCRIPT_NAME}.sh forceupdate updates to latest version (force update)
542-
${SCRIPT_NAME}.sh run_now run update process on router
543-
${SCRIPT_NAME}.sh processNodes run update check on nodes
544-
${SCRIPT_NAME}.sh develop switch to development branch
545-
${SCRIPT_NAME}.sh stable switch to stable branch
546-
${SCRIPT_NAME}.sh startup runs startup initialization & mounts WebUI page
547-
${SCRIPT_NAME}.sh install installs add-on files
548-
${SCRIPT_NAME}.sh uninstall uninstalls add-on files
545+
${SCRIPT_NAME}.sh about describe add-on functionality
546+
${SCRIPT_NAME}.sh help show available commands & Wiki URL
547+
${SCRIPT_NAME}.sh checkupdates check for available MerlinAU updates
548+
${SCRIPT_NAME}.sh forceupdate update to latest MerlinAU version
549+
${SCRIPT_NAME}.sh run_now run F/W update process
550+
${SCRIPT_NAME}.sh processNodes run update check on nodes
551+
${SCRIPT_NAME}.sh develop switch to development branch
552+
${SCRIPT_NAME}.sh stable switch to stable master branch
553+
${SCRIPT_NAME}.sh startup run startup initialization actions
554+
${SCRIPT_NAME}.sh install install MerlinAU files
555+
${SCRIPT_NAME}.sh uninstall uninstall MerlinAU files
556+
557+
Wiki page:
558+
https://github.com/ExtremeFiretop/MerlinAutoUpdate-Router/wiki
549559
EOF
550560
echo
551561
_DoExit_ 0
@@ -7334,7 +7344,7 @@ _Toggle_FW_UpdateCheckSetting_()
73347344
}
73357345

73367346
##----------------------------------------##
7337-
## Modified by Martinski W. [2024-Oct-04] ##
7347+
## Modified by Martinski W. [2025-Feb-22] ##
73387348
##----------------------------------------##
73397349
_RemoveCronJobsFromAddOns_()
73407350
{
@@ -7375,7 +7385,10 @@ _RemoveCronJobsFromAddOns_()
73757385
Say "Cron jobs [$cronJobCount] from 3rd-party add-ons were found."
73767386
Say "---------------------------------------------------------------"
73777387

7378-
sleep 5
7388+
"$isInteractive" && \
7389+
printf "\nPlease wait to allow already started cron jobs to complete execution..."
7390+
sleep 15
7391+
"$isInteractive" && printf "\nDone.\n"
73797392
return 0
73807393
}
73817394

@@ -8459,6 +8472,7 @@ Please manually update to version ${GRNct}${MinSupportedFirmwareVers}${NOct} or
84598472
echo
84608473

84618474
# *WARNING*: NO MORE logging at this point & beyond #
8475+
sync ; sleep 2 ; echo 3 > /proc/sys/vm/drop_caches ; sleep 3
84628476
/sbin/ejusb -1 0 -u 1 2>/dev/null
84638477

84648478
#----------------------------------------------------------------------------------#

0 commit comments

Comments
 (0)