Hi,
I want to centralize the mikrotik auto-upgrades from a linux server.
I have ssh keys working, on a linux server I made a small script that sends the following commands:
ssh mikrotikhost “system upgrade refresh;”;
sleep 5;
ssh mikrotikhost “system upgrade download-all reboot-after-download=yes;”;
The sleep line is obviously for the time the mikrotik needs to query the mikrotik package server.
If I start this from a script, it doesn’t work, it hangs randomly, if I do exactly the same but interactively, like “ssh mikrotikhost” then type the commands, it does work..!?
also, it could be related.. from time to time, I ssh the mikrotik, I logout, then ssh again and ssh hangs.. is there some kind of ssh connection rate limit?
I also tried this script:
add name=upgrade source={/system upgrade refresh
:if([/system upgrade get [/system upgrade find source=] status]!=“installed”)
do={/system upgrade download-all reboot-after-download=yes}
}
Replacing the with the mikrotik package server’s ip address but it does nothing..
Thank you!