Commit graph

1093 commits

Author SHA1 Message Date
Christian Hesse d87c50cf68 check-health: indicate voltage increase or decrease 2021-11-16 22:21:37 +01:00
Christian Hesse 185fe2c730 reintroduce global-wait 2021-11-16 22:21:37 +01:00
Christian Hesse 3b997d3087 global-functions: drop deprecated function $LogPrintExit
... which has been replaced by $LogPrintExit2 some time ago.
2021-11-16 22:21:22 +01:00
Christian Hesse 8fc88c73f8 shorten modules directory name (global-functions.d -> mod) 2021-11-15 22:18:10 +01:00
Christian Hesse f484e45b6a bridge-port-to-default -> global-functions.d/bridge-port-to 2021-11-15 22:18:10 +01:00
Christian Hesse b6215ba958 add global-functions.d/bridge-port-vlan 2021-11-12 16:09:35 +01:00
Christian Hesse a9f81c7a14 doc: move notification images to script-specific directories 2021-11-11 22:50:30 +01:00
Christian Hesse 8a941fcd8d hotspot-to-wpa: drop support for tx limits
... if you need to limit bandwidth use queues instead.
2021-11-03 15:21:01 +01:00
Christian Hesse 99a95d310e global-functions: $NotificationFunctions->"email": check for valid settings
No need to queue mails if 'address' and 'from' are not specified...
2021-10-01 20:39:59 +02:00
Christian Hesse f780b205a9 global-functions: $DeviceInfo: do not fail on non-RouterBoard with ROS 7.x 2021-10-01 09:00:36 +02:00
Christian Hesse 4ebe2628b0 global-functions.d/notification-telegram: fix calculation on cut off 2021-09-28 16:26:26 +02:00
Christian Hesse 72d50aa13f doc/accesslist-duplicates: use real screenshot 2021-09-22 10:33:21 +02:00
Christian Hesse 0d09121d68 README: add a note about date and time 2021-09-21 21:53:51 +02:00
Christian Hesse 4bdfcf1643 README: use real screenshots...
... and make sure copy-and-paste with code does not fail.

Also end all commands with a semicolon for Github copy button.
2021-09-21 21:42:26 +02:00
Christian Hesse 7952a6afac hotspot-to-wpa-cleanup: match dhcp server name
... as we do not want the hotspot's lease to become static.
2021-09-21 21:26:13 +02:00
Christian Hesse 9295d06fe2 global-functions.d/inspectvar: add $InspectVar...
to inspect variables. This is useful for variables with (nested) arrays,
for example inspecting $NetwatchNotify (from netwatch-notify):

[admin@Mikrotik] > $InspectVar $NetwatchNotify
-type-> array
  -key-> quad-one
    -type-> array
      -key-> count
        -type-> num
        -value-> 0
      -key-> notified
        -type-> bool
        -value-> false
      -key-> parent
        -type-> nothing
      -key-> resolve-failed
        -type-> nothing
      -key-> since
        -type-> nothing
  -key-> example.com
    -type-> array
      -key-> count
        -type-> num
        -value-> 0
      -key-> notified
        -type-> bool
        -value-> false
      -key-> parent
        -type-> str
        -value-> quad-one
      -key-> resolve-failed
        -type-> nothing
      -key-> since
        -type-> nothing
2021-09-21 21:26:13 +02:00
Christian Hesse ce78d7d9e9 global-functions: notify about move of $IPCalc and $ScriptRunOnce to modules
Just install with...

$ScriptInstallUpdate global-functions.d/ipcalc

... and/or...

$ScriptInstallUpdate global-functions.d/scriptrunonce

... and use the functions as before.
2021-09-21 21:26:13 +02:00
Christian Hesse 012db05a93 global-functions: move $ScriptRunOnce to optional module 2021-09-21 21:26:13 +02:00
Christian Hesse 8b05d25487 global-functions: move $IPCalc to optional module 2021-09-21 21:26:13 +02:00
Christian Hesse 5391045bd5 upload-backup: warn on missing sensitive information with ROS 7.x 2021-09-21 21:26:13 +02:00
Christian Hesse 1bacfaf12b email-backup: warn on missing sensitive information with ROS 7.x 2021-09-21 21:26:13 +02:00
Christian Hesse 15e60da7f0 certs: drop old chain GTS CA 1O1 / GlobalSign 2021-09-21 21:26:09 +02:00
Christian Hesse 44d2f04e0e certs: add new chain GTS CA 1C3 / GTS Root R1
This is used by Google DNS (8.8.8.8).

$CertificateAvailable "GTS CA 1C3"
/ip dns set use-doh-server=https://8.8.8.8/dns-query verify-doh-cert=yes
2021-09-20 20:56:55 +02:00
Christian Hesse ec7c88a780 certs: drop old intermediate cert DigiCert ECC Secure Server CA 2021-09-20 20:54:11 +02:00
Christian Hesse a3798ff656 certs: add new intermediate cert DigiCert TLS Hybrid ECC SHA384 2020 CA1
This is used by Cloudflare DNS (1.1.1.1) and Quard9 (9.9.9.9).

$CertificateAvailable "DigiCert TLS Hybrid ECC SHA384 2020 CA1"
/ip dns set use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes

$CertificateAvailable "DigiCert TLS Hybrid ECC SHA384 2020 CA1"
/ip dns set use-doh-server=https://9.9.9.9/dns-query verify-doh-cert=yes
2021-09-20 20:52:03 +02:00
Christian Hesse 70f9c7926b global-functions*: syntax for ROS 7.x
Strings with escape sequence have to be enclosed in parentheses. Looks
like RouterOS 7.x is stricter here...
2021-09-08 14:33:02 +02:00
Christian Hesse 150c228197 global-functions: $CertificateAvailable: drop version check 2021-09-02 08:55:34 +02:00
Christian Hesse 832e899cda global-functions: $RequiredRouterOS: allow to use without warning 2021-09-01 14:05:55 +02:00
Christian Hesse ae8e22941e global-functions: $ScriptLock: handle array by index
This should mitigate race conditions while rewriting the array.
2021-08-31 21:40:42 +02:00
Christian Hesse d356d6f57c global-functions: $ScriptLock: do not store but calculate job count
This should mitigate some more race conditions.
2021-08-31 21:40:42 +02:00
Christian Hesse 6b04fff3eb lease-script: move debug output up 2021-08-30 16:03:29 +02:00
Christian Hesse 73dfb0c8ee check-health: use $ScriptLock 2021-08-27 11:21:56 +02:00
Christian Hesse 7afce17f70 netwatch-notify: use $ScriptLock 2021-08-27 11:20:57 +02:00
Christian Hesse d556e97a46 dhcp-to-dns: check for existence of address
Chances are that $LeaseVal is an array with just an id - no idea why this
happens. So do not check for array but existence of address.
2021-08-26 11:12:39 +02:00
Christian Hesse 772e66b622 global-functions.d/notification-telegram: for syntax for ROS 7.x
Strings with escape sequence have to be enclosed in parentheses. Looks
like RouterOS 7.x is stricter here...
2021-08-25 00:35:08 +02:00
Christian Hesse d4896f2585 update list of contributors 2021-08-16 12:39:53 +02:00
Christian Hesse 4269bc9548 global-functions: $ScriptLock: check for successful removal of ticket
The script is already locked, so there is no second script to remove a
ticket at the same time. However a new script can add a new ticket and
overwrite the removal... Thus check for successful removal anyway.
2021-07-25 23:19:54 +02:00
Christian Hesse 8e2c783068 lease-script: drop differentiation of assign / deassign...
... not that we have early locking.
2021-07-15 12:47:05 +02:00
Christian Hesse 9509371690 lease-script: use $ScriptLock
There were still ways to produce errors from lease scripts...
Let's lock earlier, this should fix it.
2021-07-15 11:45:35 +02:00
Christian Hesse 698c795eee update list of contributors 2021-07-15 11:25:46 +02:00
Ben Harris 9fba3dd8df global-functions: $ScriptLock: fix off-by-one check...
... for stale job tickets

Signed-off-by: Christian Hesse <mail@eworm.de>
2021-07-15 10:17:25 +02:00
Christian Hesse 29ececda9b collect-wireless-mac: check for existence of mac address
Chance are that $RegVal is an array with just an id - no idea why this
happens. So do not check for array but existence of mac address.
2021-07-11 22:30:00 +02:00
Christian Hesse 483506b189 global-functions: introduce $ScriptRunOnce 2021-07-10 23:18:04 +02:00
Christian Hesse d1ef710093 global-functions: $ScriptInstallUpdate: add error handling for changelog 2021-07-09 22:04:15 +02:00
Christian Hesse 574c50908b global-functions.d/notification-telegram: subject in bold & underline
This makes the subject visually delimited.
2021-07-09 21:21:30 +02:00
Christian Hesse dc7fc0d385 finally remove old scripts 2021-07-09 12:46:03 +02:00
Christian Hesse b864db1e38 global-functions: $ScriptInstallUpdate: add error handling for migration 2021-07-09 12:46:03 +02:00
Christian Hesse f694e1e54d global-functions: $ScriptInstallUpdate: drop unused variable
This was a left-over from re-run message.
2021-07-09 12:46:03 +02:00
Christian Hesse 81cba72bec global-functions: $ScriptInstallUpdate: drop the migration pattern 2021-07-09 12:46:03 +02:00
Christian Hesse d80a7efb7c doc/netwatch-notify: hint on escaping, with example 2021-07-09 12:46:03 +02:00