Refactor email body construction for device information and update action clarity

This commit is contained in:
Alexander Tebiev 2025-04-10 20:23:44 +02:00
parent df1f6c1dbd
commit 73c405de88

4
v3.rsc
View file

@ -458,7 +458,7 @@
:local changelogUrl "Check RouterOS changelog: https://mikrotik.com/download/changelogs/"
:local mailBodyDeviceInfo ""
:set mailBodyDeviceInfo ($mailBodyDeviceInfo . "\n\nDevice information:")
:set mailBodyDeviceInfo ($mailBodyDeviceInfo . "Device information:")
:set mailBodyDeviceInfo ($mailBodyDeviceInfo . "\n---------------------")
:set mailBodyDeviceInfo ($mailBodyDeviceInfo . "\nName: $deviceIdentityName")
:set mailBodyDeviceInfo ($mailBodyDeviceInfo . "\nModel: $deviceRbModel")
@ -473,7 +473,6 @@
:local mailAttachments [:toarray ""]
## IP address detection & anonymous statistics collection
:if ($updateStep = 1 or $updateStep = 3) do={
:if ($updateStep = 3) do={
@ -578,6 +577,7 @@
:set isOsNeedsToBeUpdated true
} else={
:log info ("$SMP The script will not install this update, because it is not a patch update. Current version: `$runningOsVersion`, new version: `$routerOsVersionAvailable`.")
:set mailBodyPartAction ($mailBodyPartAction . "\nThis update will not be installed, because the script is set to install only patch updates.")
}
} else={
:set isOsNeedsToBeUpdated true