Commit graph

63 commits

Author SHA1 Message Date
Christian Hesse
883920aeae notify about $IPCalc 2020-07-14 16:22:17 +02:00
Christian Hesse
23563cb9aa notify about early-errors 2020-07-14 16:16:46 +02:00
Christian Hesse
2907dbe18f check-routeros-update: support installing patch updates automatically 2020-07-07 00:21:47 +02:00
Christian Hesse
01fe371a0d dhcp-to-dns: allow to configure 'dhcp' prefix in zone 2020-07-03 08:20:36 +02:00
Christian Hesse
71ad56aacc explicitly name the license
Copyright (C) 2013-2020 Christian Hesse <mail@eworm.de>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

https://www.gnu.org/licenses/#GPL
https://www.gnu.org/licenses/gpl.html
https://www.gnu.org/licenses/gpl.md
2020-06-19 22:17:42 +02:00
Christian Hesse
2363f75e7f ask for GitHub and GitLab stars 2020-03-27 22:19:33 +01:00
Christian Hesse
1d93e92dcd Notify about new documentation! 2020-03-27 22:12:49 +01:00
Christian Hesse
070ae8ecb5 link global-{config,config-overlay,functions} to main README 2020-03-27 22:12:49 +01:00
Christian Hesse
5f46ef7635 completely replace script-updates with $ScriptInstallUpdate 2020-03-23 14:01:20 +01:00
Christian Hesse
739884ecc7 certificate-renew-issued: support auto-export with given passphrases 2020-03-20 09:26:12 +01:00
Christian Hesse
628ae1bd70 bridge-port-to-default: use $ParseKeyValueStore...
... and unbreak last commit removing delay (69352c90).
This requires a change in configuration syntax. Change this...

    comment="default:br-local, alt:br-guest"

to...

    comment="default=br-local, alt=br-guest"
2020-03-03 13:32:00 +01:00
Christian Hesse
b5f4c2c87e global-config: drop $ScriptUpdatesConfigChangesIgnore
Comment or remove $GlobalConfigVersion in global-config-overlay
to disable change notifications.
2020-02-04 20:19:46 +01:00
Christian Hesse
1e72f03e5e README: update instructions to use $ScriptInstallUpdate 2020-01-29 22:14:56 +01:00
Christian Hesse
afb9839073 update copyright for 2020 2020-01-01 17:00:39 +01:00
Christian Hesse
df0c2afa31 check-health: decrease default threshold for voltage 2019-10-22 15:03:52 +02:00
Christian Hesse
f40bb2c8c8 check-health: make threshold for voltage configurable 2019-10-14 19:13:31 +02:00
Christian Hesse
1cee36a911 introduce global-config-overlay 2019-09-12 21:29:41 +02:00
Christian Hesse
166bbffe1d script-updates: add donation hint in configuration warning notification 2019-08-30 14:10:58 +02:00
Christian Hesse
05f2d03ad9 use shorter url for my repository 2019-08-30 13:43:21 +02:00
Christian Hesse
29dc1b8841 add script 'check-health'
This may be incomplete... Please report if you have missing PSUs,
ttemperature sensors, whatever.
2019-08-27 12:01:32 +02:00
Christian Hesse
8d1313f588 add script 'upload-backup' 2019-07-19 11:46:29 +02:00
Christian Hesse
26f01b238b global-config: move config for email-backup
Signed-off-by: Christian Hesse <mail@eworm.de>
2019-07-19 11:46:29 +02:00
Christian Hesse
5101d57d52 backup: split off cloud-backup
Currently backup to MikroTik cloud is pretty unreliable and script can
not catch errors at runtime. Looks like this does not change any time
soon (Ticket#2019052022003204).

So let's just split off the cloud backup to make sure email backup works
as expected.
2019-06-14 15:13:41 +02:00
Christian Hesse
15d3e9ea7b global-config: change duplicate word from daily psk 2019-04-05 07:56:50 +02:00
Christian Hesse
7b1c275cc2 script-updates: add option to ignore global-config changes 2019-04-02 08:48:35 +02:00
Christian Hesse
594aef2aab check-certificates: support multiple passphrases 2019-04-01 22:45:38 +02:00
Christian Hesse
1cd7679a07 update-tunnelbroker: get tunnelbroker config from interface comment 2019-01-04 20:20:20 +01:00
Christian Hesse
870f00bb36 global: 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*
2019-01-04 12:35:34 +01:00
Christian Hesse
7d06a7e8c2 global-{config,functions}: move variables, make independent 2019-01-03 16:09:03 +01:00
Christian Hesse
6e03a3b935 script-updates: add configuration versioning 2019-01-03 15:36:26 +01:00
Christian Hesse
fe04b8b8db rename script 'check-lte-firmware-update' -> 'check-lte-firmware-upgrade'
That's the correct wording from commands..
2019-01-02 22:50:23 +01:00
Michael Gisbers
ca16f286ef update-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>
2019-01-02 15:02:42 +01:00
Christian Hesse
472cd3d905 update copyright for 2019 2019-01-02 09:38:34 +01:00
Christian Hesse
44be3d8d07 check-certificates: support auto-renew of certificates 2018-12-20 15:55:40 +01:00
Christian Hesse
ee49fe3184 update-gre-address: remove settings from global-config
Instead read infos from gre interface comment.
2018-12-19 17:22:36 +01:00
Christian Hesse
9f077ab8bf ipv6-update: remove settings from global-config
Instead make it more robust by reading comments.
2018-12-19 16:48:34 +01:00
Christian Hesse
6f606f9ca5 email-backup: support cloud backup 2018-12-18 22:48:28 +01:00
Christian Hesse
9346df67d7 add script 'check-lte-firmware-update' 2018-12-14 23:04:18 +01:00
Christian Hesse
6e4d715937 global-functions: add identity tag in $SendNotification
... and send subject in telegram message.
2018-11-28 21:19:39 +01:00
Christian Hesse
c4f8c1ad52 global-config: add identity tag 2018-11-26 13:45:02 +01:00
Christian Hesse
015f8e01b5 global-config: sort sms-action alphabetically 2018-11-13 10:20:45 +01:00
Christian Hesse
e17389749f global-config: add more examples for mode button and sms-action 2018-11-13 10:20:14 +01:00
Christian Hesse
7aae1bf9dd global-config: default for telegram is empty strings...
... to make sure the api is not flooded with invalid requests.
2018-10-10 10:22:18 +02:00
Christian Hesse
5e4ef0ab8f global-functions: add function to notify via e-mail and telegram 2018-10-09 15:46:39 +02:00
Christian Hesse
977a5d5f5e global-functions: move daily psk secrets to global-config 2018-10-09 14:17:19 +02:00
Christian Hesse
7b4bef1a1e make GeneratePSK a global function 2018-10-09 14:15:34 +02:00
Christian Hesse
9c3f3b9f20 add global-functions 2018-10-09 14:15:34 +02:00
Christian Hesse
311475e67c add script 'bridge-port-toggle'
... to toggle between configuration 'default' and 'alt'.
2018-10-04 14:03:09 +02:00
Christian Hesse
17f64b48af bridge-port-to-default: support different configurations
Just add something like this to your bridge ports:

comment="default:br-ext,alt:br-intern"
2018-10-04 13:56:09 +02:00
Christian Hesse
ea4b739d00 global-config: add missing semicolons 2018-10-04 13:32:21 +02:00