Just a simple script to update a group of MikroTik devices automatically ✨
You need to create a source file inside the sources folder and fill up the following variables:
private_key: The private RSA key used to connect to each deviceusername: The username linked to the public RSA key.hosts: An array of the devices to be updated.
Example contents:
private_key='/Users/myname/.ssh/myprivatekey'
username='myadmin'
hosts=( '192.168.0.1' '10.0.0.2' '10.1.1.1' )After having created the source file, simply execute the script 🤓
$ bash updater.sh demoIt will look under the
sourcesfolder for ademofile
or you can specify an absolute path
$ bash updater.sh /path/to/sources/demoYou are done! 👍🏻
Create an alias so you always get the current version
Example:
$ alias mikrotik-updater 'curl -sL https://raw.githubusercontent.com/cperezabo/mikrotik-updater/refs/heads/master/updater.sh | bash -s --'and execute it simply as
$ mikrotik-updater /path/to/sources/demo