Community discussions

MikroTik App
 
unlikely
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 57
Joined: Fri Feb 21, 2020 1:16 pm

Releasing Safe Mode from script

Wed Nov 15, 2023 7:09 pm

There is a way to terminate a Safe Mode session from a script?

I found this way to unroll the changes:
:local history [/system/history/print detail as-value where floating-undo=yes]
:local historylength [:len $history]

:while ($historylength > 0) do={
    /undo
    :set $historylength ($historylength - 1)
}
By the way this doesn't terminate Safe Mode.

There is a direct way? A more robust way maybe?

There is way to commit changes instead?

Context: viewtopic.php?t=201440

Who is online

Users browsing this forum: No registered users and 3 guests