aboutsummaryrefslogtreecommitdiffstats
path: root/global-config
AgeCommit message (Expand)AuthorFilesLines
2019-04-01check-certificates: support multiple passphraseschange-3Gravatar Christian Hesse1-2/+5
2019-01-04update-tunnelbroker: get tunnelbroker config from interface commentGravatar Christian Hesse1-7/+0
2019-01-04global: variable names are CamelCase••• ___ _ ___ __ / _ )(_)__ _ / _/__ _/ /_ / _ / / _ `/ / _/ _ `/ __/ /____/_/\_, / /_/ \_,_/\__/ _ __ /___/ _ __ | | / /___ __________ (_)___ ____ _/ / | | /| / / __ `/ ___/ __ \/ / __ \/ __ `/ / | |/ |/ / /_/ / / / / / / / / / / /_/ /_/ |__/|__/\__,_/_/ /_/ /_/_/_/ /_/\__, (_) /____/ RouterOS has some odd behavior when it comes to variable names. Let's have a look at the interfaces: [admin@MikroTik] > / interface print where name=en1 Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU 0 RS en1 ether 1500 1598 That looks ok. Now we use a script: { :local interface "en1"; / interface print where name=$interface; } And the result... [admin@MikroTik] > { :local interface "en1"; {... / interface print where name=$interface; } Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU 0 RS en1 ether 1500 1598 ... still looks ok. We make a little modification to the script: { :local name "en1"; / interface print where name=$name; } And the result: [admin@MikroTik] > { :local name "en1"; {... / interface print where name=$name; } Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU 0 RS en1 ether 1500 1598 1 S en2 ether 1500 1598 2 S en3 ether 1500 1598 3 S en4 ether 1500 1598 4 S en5 ether 1500 1598 5 R br-local bridge 1500 1598 Ups! The filter has no effect! That happens whenever the variable name ($name) matches the property name (name=). And another modification: { :local type "en1"; / interface print where name=$type; } And the result: [admin@MikroTik] > { :local type "en1"; {... / interface print where name=$type; } Flags: D - dynamic, X - disabled, R - running, S - slave # NAME TYPE ACTUAL-MTU L2MTU Ups! Nothing? Even if the variable name ($type) matches whatever property name (type=) things go wrong. The answer from MikroTik support (in Ticket#2019010222000454): > This is how scripting works in RouterOS and we will not fix it. To get around this we use variable names in CamelCase. Let's hope Mikrotik never ever introduces property names in CamelCase... *fingers crossed* Gravatar Christian Hesse1-39/+39
2019-01-03global-{config,functions}: move variables, make independentGravatar Christian Hesse1-7/+1
2019-01-03script-updates: add configuration versioningGravatar Christian Hesse1-0/+4
2019-01-02rename script 'check-lte-firmware-update' -> 'check-lte-firmware-upgrade'•••That's the correct wording from commands.. Gravatar Christian Hesse1-1/+1
2019-01-02update-tunnelbroker: move configuration to global-config...•••... and get the external ip address from cloud. Signed-off-by: Michael Gisbers <michael@gisbers.de> Signed-off-by: Christian Hesse <mail@eworm.de> Gravatar Michael Gisbers1-0/+7
2019-01-02update copyright for 2019Gravatar Christian Hesse1-1/+1
2018-12-20check-certificates: support auto-renew of certificatesGravatar Christian Hesse1-0/+5
2018-12-19update-gre-address: remove settings from global-config•••Instead read infos from gre interface comment. Gravatar Christian Hesse1-5/+0
2018-12-19ipv6-update: remove settings from global-config•••Instead make it more robust by reading comments. Gravatar Christian Hesse1-4/+0
2018-12-18email-backup: support cloud backupGravatar Christian Hesse1-0/+1
2018-12-14add script 'check-lte-firmware-update'Gravatar Christian Hesse1-0/+1
2018-11-28global-functions: add identity tag in $SendNotification•••... and send subject in telegram message. Gravatar Christian Hesse1-1/+1
2018-11-26global-config: add identity tagGravatar Christian Hesse1-1/+1
2018-11-13global-config: sort sms-action alphabeticallyGravatar Christian Hesse1-2/+2
2018-11-13global-config: add more examples for mode button and sms-actionGravatar Christian Hesse1-3/+5
2018-10-10global-config: default for telegram is empty strings...•••... to make sure the api is not flooded with invalid requests. Gravatar Christian Hesse1-2/+4
2018-10-09global-functions: add function to notify via e-mail and telegramGravatar Christian Hesse1-0/+5
2018-10-09global-functions: move daily psk secrets to global-configGravatar Christian Hesse1-2/+16
2018-10-09make GeneratePSK a global functionGravatar Christian Hesse1-1/+3
2018-10-09add global-functionsGravatar Christian Hesse1-0/+1
2018-10-04add script 'bridge-port-toggle'•••... to toggle between configuration 'default' and 'alt'. Gravatar Christian Hesse1-0/+1
2018-10-04bridge-port-to-default: support different configurations•••Just add something like this to your bridge ports: comment="default:br-ext,alt:br-intern" Gravatar Christian Hesse1-0/+3
2018-10-04global-config: add missing semicolonsGravatar Christian Hesse1-5/+5
2018-09-27start scripts with a magic token / shebangGravatar Christian Hesse1-1/+1
2018-09-13fix typosGravatar Christian Hesse1-1/+1
2018-09-13sms-action: move configuration to global-configGravatar Christian Hesse1-0/+7
2018-09-10add scripts mode-button-{event,scheduler}Gravatar Christian Hesse1-0/+8
2018-09-05check-routeros-update: enable auto update for safe versionGravatar Christian Hesse1-0/+5
2018-08-30check-routeros-update: resend notification if version changesGravatar Christian Hesse1-1/+1
2018-08-27script-updates: add support for url suffix•••This allows to fetch from different branch... Gravatar Christian Hesse1-0/+1
2018-08-24add empty comment at first line...•••... for better formatting in export. Gravatar Christian Hesse1-0/+1
2018-08-06add script 'gps-track'Gravatar Christian Hesse1-0/+3
2018-07-10script-updates: always accept updates from fileGravatar Christian Hesse1-3/+2
2018-07-09global-config: script-updates url examples for github and gitlabGravatar Christian Hesse1-0/+2
2018-07-09script-updates: support fetch from urlGravatar Christian Hesse1-0/+6
2018-07-05add scriptsGravatar Christian Hesse1-0/+42