Commit graph

781 commits

Author SHA1 Message Date
Christian Hesse
4c61849483 capsman-download-packages: upgrade CAPs one after another with delay 2019-02-07 11:04:15 +01:00
Christian Hesse
b3459ed47c gps-track: strip trailing binary zeros 2019-01-29 09:32:18 +01:00
Christian Hesse
9c71b191c1 gps-track: log about coordinate-format 2019-01-29 09:30:57 +01:00
Christian Hesse
eda4d10c0a check-routeros-update: run email-backup on auto-update 2019-01-18 11:08:11 +01:00
Christian Hesse
29d47361b7 email-backup: silence unwanted output 2019-01-15 10:58:54 +01:00
Christian Hesse
3ab5726fa5 update-tunnelbroker: fix parsing id 2019-01-15 10:46:54 +01:00
Christian Hesse
494fdfd920 update-tunnelbroker: simplify array access 2019-01-15 10:46:35 +01:00
Christian Hesse
de0a3a7d88 netwatch-syslog: simplify array access 2019-01-15 10:40:40 +01:00
Christian Hesse
1ca1b48bcd collect-wireless-mac: simplify array access 2019-01-15 10:38:47 +01:00
Christian Hesse
cedc178595 dhcp-lease-comment: simplify array access 2019-01-15 10:34:22 +01:00
Christian Hesse
07973066c9 lease-script: split scripts for de/assign, add debug log 2019-01-15 10:29:12 +01:00
Christian Hesse
eb14820f2e email-backup: give board name and model 2019-01-14 11:29:36 +01:00
Christian Hesse
5664449f64 initial-commands: put into blocks 2019-01-12 15:48:48 +01:00
Christian Hesse
afeab858d4 check-certificates: strip prefix from issuer CN 2019-01-12 00:47:53 +01:00
Christian Hesse
e62fbd2489 check-certificates: properly handle expired certificates 2019-01-12 00:04:53 +01:00
Christian Hesse
4ab9f9e7c8 check-certificates: move conditions to loop 2019-01-09 22:26:32 +01:00
Christian Hesse
df7cb1b88b check-certificates: shorten key for detailed infos 2019-01-09 17:38:55 +01:00
Christian Hesse
e51daf2761 check-certificates: show issuer CN only 2019-01-09 17:34:08 +01:00
Christian Hesse
57d93aa701 email-backup: be more verbose about attached files and secret key 2019-01-09 15:06:01 +01:00
Christian Hesse
fe34a80a3d check-certificates: include the issuer in notifications 2019-01-09 14:33:09 +01:00
Christian Hesse
1b9a277b47 check-certificates: update CommonName after renewal 2019-01-09 14:29:15 +01:00
Christian Hesse
40931f4f28 super-mario-theme: simplify array access 2019-01-09 12:54:59 +01:00
Christian Hesse
bd92237003 daily-psk: simplify algorithm 2019-01-09 12:52:30 +01:00
Christian Hesse
1ee2491e66 check-certificates: use time functionality
No need to calculate that...
2019-01-09 11:43:30 +01:00
Christian Hesse
5539233417 check-certificates: send notification on renewal 2019-01-09 10:38:41 +01:00
Christian Hesse
6b6c3d5119 check-certificates: drop extra warning
A sent notification implies that renewal failed.
2019-01-09 10:31:54 +01:00
Christian Hesse
0abb9a1848 ppp-on-up: just release ipv6 lease
This should get a new lease immediately.
2019-01-04 20:32:14 +01:00
Christian Hesse
63406dafbe ppp-on-up: run scripts if available 2019-01-04 20:29:42 +01:00
Christian Hesse
1cd7679a07 update-tunnelbroker: get tunnelbroker config from interface comment 2019-01-04 20:20:20 +01:00
Christian Hesse
698bed2bbc email-backup: print to update from cloud 2019-01-04 14:14:37 +01:00
Christian Hesse
c3f27bf776 ppp-on-up: fix variable handling
The variable $interface is not a name but a reference... Basically
this worked only because of the oddity - the filter did not work
and *all* dhcp-clients were disabled and enabled.
2019-01-04 13:02:34 +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
0f72662745 dhcp-to-dns: give time in short format
Note that a unit is required to make it a time value!
2019-01-03 10:28:23 +01:00
Christian Hesse
93a6bff312 daily-psk-schedule: give time in short format
Note that a unit is required to make it a time value!
2019-01-03 10:23:02 +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
Christian Hesse
e2b5124e8c add script 'unattended-lte-firmware-upgrade' 2019-01-02 22:50:23 +01:00
Christian Hesse
29a363649d add template for script documentation 2019-01-02 21:31:59 +01:00
Christian Hesse
99e92340bc README: add link to scroll up 2019-01-02 21:04:54 +01:00
Christian Hesse
7f7a9d8c89 ignore all html files 2019-01-02 16:26:32 +01:00
Christian Hesse
dfa750a7f5 Makefile: update links for generated html 2019-01-02 16:22:14 +01:00
Christian Hesse
e27a4e8f0e Makefile: update for extended functionality
This can handle new and multiple markdown files.
2019-01-02 15:41:00 +01:00
Christian Hesse
bc36fb74c3 update-tunnelbroker: verify certificate 2019-01-02 15:02:42 +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
Michael Gisbers
69e76f5ecc capsman-download-packages: use upgrade command to force remote-cap upgrade
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
688c757df0 check-routeros-update: be more verbose on error 2019-01-02 15:02:42 +01:00
Christian Hesse
a19f15c515 check-routeros-update: do not fail if safe-update-url return error
We still want the notification...
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
3cdd0fb94b global-functions: properly define global functions 2018-12-28 22:56:29 +01:00