ganggumalam

script intrusBL save as blacklistUpdate

Feb 10th, 2018
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. # Intrus Technologies Blacklist Installer
  2. # © 2017 David Joyce, Intrus Technologies
  3. #
  4. # Version 2.0.5
  5. #
  6. # This is used to install and update the blacklist importer script
  7. # as well as the scheduler tasks used to update the address-lists
  8. # and the scheduler task used to update the scripts
  9. #
  10. # These are offered free of charge to the MikroTik community. No warranty is expressed or implied.
  11. # I am not responsible for any loss of data, time, money, access, or anything else. Use at your own risk.
  12. #
  13. # P.S. Changing the script names will break things. Badly.
  14.  
  15. :do {
  16. :local currentScriptVersion [ :resolve server=mikrotikfilters.com server-port=6502 domain-name=127.0.0.2 ]
  17. :put "Installing blacklistUpdate script version: $currentScriptVersion";
  18. :local sourceServer "https://mikrotikfilters.com/";
  19. :local sourceServerPort "6501";
  20. :local scriptName "blInstaller.rsc";
  21. :put "Downloading update script...";
  22. :do {
  23. /tool fetch url="$sourceServer$scriptName" mode=https port=$sourceServerPort dst-path="/$scriptName";
  24. } on-error={
  25. :put "Error. Download failed";
  26. }
  27. :put "Importing update script...";
  28. :do {
  29. /import "$scriptName";
  30. } on-error={
  31. :put "import failed. unknown error.";
  32. }
  33. :put "Removing update script...";
  34. :do {
  35. /file remove "$scriptName";
  36. } on-error={}
  37. :put "Update Complete.";
  38. }
Advertisement
Add Comment
Please, Sign In to add comment