The first one, to update the packages, is working normally, but I would like to record each step in the log, but when it goes to update it apparently executes both commands at the same time, causing the log record to be on "wait", However, as when it finishes updating it restarts, it ends up not printing the information I want in the log.
Code: Select all
:log info "Checking for updates";
system/package/update/check-for-updates
:delay 5s;
:if ([system/package/update/get installed-version] != [system/package/update/get latest-version]) do={[:log info "New version found, updating"] [/system/package/update/install]} else={:log info "Already in the latest version"};
Code: Select all
:log info "Checking for RouterBOARD upgrade";
/system/routerboard/print
:delay 5s;
:if ([system/routerboard/get current-firmware] != [system/routerboard/get upgrade-firmware]) do={[:log info "Upgrading RouterBOARD";] [/system/routerboard/upgrade] [:delay30s] [/system/reboot]} else={ :log info "RouterBOARD already in the latest version" };