## ## Automatically upgrade RouterOS and Firmware ## https://github.com/massimo-filippi/mikrotik ## ## script by Maxim Krusina, maxim@mfcc.cz ## based on: http://wiki.mikrotik.com/wiki/Manual:Upgrading_RouterOS ## created: 2014-12-05 ## updated: 2015-12-09 ## tested on: RouterOS 6.33.1 / multiple HW devices, won't work on 6.27 and older (different update process & value naming) ## ########## Set variables ## Notification e-mail :local email "your@email.com" ########## Do the stuff ## Check for update /system package update set channel=current check-for-updates ## Waint on slow connections :delay 15s; ## Important note: "installed-version" was "current-version" on older Roter OSes :if ([get installed-version] != [get latest-version]) do={ ## New version of RouterOS available, let's upgrade /tool e-mail send to="$email" subject="Upgrading RouterOS on router $[/system identity get name]" body="