Upgrade rsc files

From MikroTik Wiki
Revision as of 18:42, 20 August 2012 by Earthstation (talk | contribs)
Jump to: navigation, search

Introduction

The file upgrade.rsc is the key component to mass roll-outs of CPE setting changes and script additions. By creating this file and uploading to main mikrotik AP/router, changing hundreds of CPE's within a few seconds is only moments away. Enable the trigger IP (in our case 172.16.0.1), sit back and watch all your CPE's log in via ftp, collect the upgrade.rsc file and import it on all the CPE's.

Below are few examples of upgrade.rsc files. You MUST test these on a single local CPE to see that no negative reactions occur, before rolling out for network wide implementation. As always, used at your own risk.


Upgrade.rsc file header

Every upgrade.rsc has the same first 6 lines. So we will not include these lines in each file. please not ignore this, you do need to do maintenance of the number of files on your CPE's and this is the simplest method.

:if ([file find type=".rif file"]!="") do={/file remove [find type=".rif file"]}
:if ([file find type=".tar file"]!="") do={/file remove [find type=".tar file"]}
:if ([file find type="backup"]!="") do={/file remove [find type="backup"]}
:if ([file find type="script"]!="") do={/file remove [find type="script"]}
/system backup save;
:delay 10s;