Skip to content

Instantly share code, notes, and snippets.

@Pliner
Created October 1, 2018 03:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pliner/00187cf2219ead1b9d1b5143bcfb415d to your computer and use it in GitHub Desktop.
Save Pliner/00187cf2219ead1b9d1b5143bcfb415d to your computer and use it in GitHub Desktop.
mikrotik import script
:do {
:do {
/file remove "/total.rsc";
} on-error={}
:put "Downloading total.rsc...";
:do {
/tool fetch address=/*address*/ src-path=total.rsc dst-path="/total.rsc" mode=tftp keep-result=yes
} on-error={
:put "Error. Download failed";
}
/ip firewall address-list remove [/ip firewall address-list find list=rkn]
:put "Importing total.rsc...";
:do {
/import "/total.rsc";
} on-error={
:put "import failed. unknown error.";
}
:put "Update Complete.";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment