Created
October 1, 2018 03:58
-
-
Save Pliner/00187cf2219ead1b9d1b5143bcfb415d to your computer and use it in GitHub Desktop.
mikrotik import script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
: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