diff options
author | Christian Hesse <mail@eworm.de> | 2018-12-17 23:15:23 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2018-12-18 21:47:47 +0100 |
commit | be68c739a840d19f59e76e82ed257c61596ff61a (patch) | |
tree | 61d96337cc7aa5a9221bceef4f35b3c7100c3c84 | |
parent | f97b45b5b8b90e1b14a8c14721acd04595b3d7a7 (diff) |
README: add initial commands for copy and paste
-rw-r--r-- | README.md | 9 | ||||
-rw-r--r-- | initial-commands | 19 |
2 files changed, 28 insertions, 0 deletions
@@ -22,6 +22,15 @@ RouterOS version. Initial setup ------------- +### Get me ready! + +If you know how things work just copy and paste the +[initial commands](initial-commands). Remember to edit and rerun +`global-config`! +First time useres should take the long way below. + +### The long way in detail + The update script does server certificate verification, so first step is to download the certificates. If you intend to download the scripts from a different location (for example from github.com) install the corresponding diff --git a/initial-commands b/initial-commands new file mode 100644 index 0000000..37b7415 --- /dev/null +++ b/initial-commands @@ -0,0 +1,19 @@ +#!rsc +# RouterOS script: initial-commands +# Copyright (c) 2018 Christian Hesse <mail@eworm.de> + +{ + / tool fetch "https://git.eworm.de/cgit.cgi/routeros-scripts/plain/certs/731d3d9cfaa061487a1d71445a42f67df0afca2a6c2d2f98ff7b3ce112b1f568.pem" dst-path=letsencrypt.pem; + :delay 1s; + / certificate import file-name=letsencrypt.pem passphrase=""; + / certificate set name="ISRG-Root-X1" [ find where fingerprint="96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6" ]; + / certificate set name="Let-s-Encrypt-Authority-X3" [ find where fingerprint="731d3d9cfaa061487a1d71445a42f67df0afca2a6c2d2f98ff7b3ce112b1f568" ]; + :if ([ / certificate print count-only where fingerprint="96bcec06264976f37460779acf28c5a7cfe8a3c0aae11a8ffcee05c0bddf08c6" or fingerprint="731d3d9cfaa061487a1d71445a42f67df0afca2a6c2d2f98ff7b3ce112b1f568" ] != 2) do={ + :error "Anything is wrong with your certificates!"; + } + :foreach script in={ "global-config"; "global-functions"; "script-updates" } do={ + / system script add name=$script source=([ / tool fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit.cgi/routeros-scripts/plain/" . $script) output=user as-value]->"data"); + } + / system script run global-config; + / system scheduler add name=global-config start-time=startup on-event=global-config; +} |