You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
:local deviceUpdateChannel [/system package update get channel];
194
195
196
+
197
+
:local deviceRbModel "CloudHostedRouter";
198
+
:local deviceRbSerialNumber "--";
199
+
:local deviceRbCurrentFw "--";
200
+
:local deviceRbUpgradeFw "--";
201
+
202
+
:if ($isSoftBased = false) do={
203
+
:set deviceRbModel [/system routerboard get model];
204
+
:set deviceRbSerialNumber [/system routerboard get serial-number];
205
+
:set deviceRbCurrentFw [/system routerboard get current-firmware];
206
+
:set deviceRbUpgradeFw [/system routerboard get upgrade-firmware];
207
+
};
208
+
195
209
:local isOsUpdateAvailable false;
196
210
:local isOsNeedsToBeUpdated false;
197
211
@@ -289,7 +303,7 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
289
303
if ($isOsNeedsToBeUpdated = true) do={
290
304
:log info ("$SMP New RouterOS is going to be installed! v.$deviceOsVerInst -> v.$deviceOsVerAvail");
291
305
:set mailSubject ($mailSubject . " New RouterOS is going to be installed! v.$deviceOsVerInst -> v.$deviceOsVerAvail.");
292
-
:set mailBody ($mailBody . "Your Mikrotik will be updated to the new RouterOS version from v.$deviceOsVerInst to v.$deviceOsVerAvail (Update channel: $updateChannel) \r\nFinal report with the detailed information will be sent when update process is completed. \r\nIf you have not received second email in the next 5 minutes, then probably something went wrong. (Check your device logs)");
306
+
:set mailBody ($mailBody . "Your Mikrotik will be updated to the new RouterOS version from v.$deviceOsVerInst to v.$deviceOsVerAvail (Update channel: $updateChannel) \r\nFinal report with the detailed information will be sent when update process is completed. \r\nIf you have not received second email in the next 10 minutes, then probably something went wrong. (Check your device logs)");
293
307
#!! There is more code connected to this part and first step at the end of the script.
294
308
}
295
309
@@ -398,12 +412,18 @@ if ([:len [/system identity get name]] = 0 or [/system identity get name] = "Mik
398
412
# Fire RouterOs update process
399
413
if ($isOsNeedsToBeUpdated = true) do={
400
414
401
-
## Set scheduled task to upgrade routerboard firmware on the next boot, task will be deleted when upgrade is done. (That is why you should keep original script name)
## Set scheduled task to upgrade routerboard firmware on the next boot, task will be deleted when upgrade is done. (That is why you should keep original script name)
0 commit comments