I am remotely managing over 400 MT devices and I am trying to script the reset-configuration. This is for our help desk to have a widget in our network management tool to reset the MT to our configuration without really needing an interactive connection or any Mikrotik specific knowledge. This is for replacement units and when the MT configuration is suspect.
The example script below would trigger a reset-configuration as long as the specified script existed on the MT. However, I had hoped the warning prompt would be suppressed when run from a script like the reboot command. Alas, my hopes are dashed upon the rocks of insanity...
So, is there a way to answer the prompt from within a single script or is there an "undocumented" switch (like force=yes) to prevent the prompt?
The import command is undesirable do to the fact that I would need to write a script to remove our settings just to re-apply the same settings again. Not to mention this wouldn't incorporate a reboot in the process to get a clean start.
I am willing to explore all methods to accomplish this. I've searched the forum to no avail.
#ResetCfg.rsc
#script start
:if ([:len [/file find name="MyLoad.rsc"]] > 0) do={
/system reset-configuration keep-users=no no-defaults=yes skip-backup=yes run-after-reset=MyLoad.rsc
} else {
:put "Specified file not found."
};
#script end
Thanks in advance!