Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Intrus Technologies Blacklist Installer
- # © 2017 David Joyce, Intrus Technologies
- #
- # Version 2.0.5
- #
- # This is used to install and update the blacklist importer script
- # as well as the scheduler tasks used to update the address-lists
- # and the scheduler task used to update the scripts
- #
- # These are offered free of charge to the MikroTik community. No warranty is expressed or implied.
- # I am not responsible for any loss of data, time, money, access, or anything else. Use at your own risk.
- #
- # P.S. Changing the script names will break things. Badly.
- :do {
- :local currentScriptVersion [ :resolve server=mikrotikfilters.com server-port=6502 domain-name=127.0.0.2 ]
- :put "Installing blacklistUpdate script version: $currentScriptVersion";
- :local sourceServer "https://mikrotikfilters.com/";
- :local sourceServerPort "6501";
- :local scriptName "blInstaller.rsc";
- :put "Downloading update script...";
- :do {
- /tool fetch url="$sourceServer$scriptName" mode=https port=$sourceServerPort dst-path="/$scriptName";
- } on-error={
- :put "Error. Download failed";
- }
- :put "Importing update script...";
- :do {
- /import "$scriptName";
- } on-error={
- :put "import failed. unknown error.";
- }
- :put "Removing update script...";
- :do {
- /file remove "$scriptName";
- } on-error={}
- :put "Update Complete.";
- }
Advertisement
Add Comment
Please, Sign In to add comment