aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-01-09email-backup: be more verbose about attached files and secret keyGravatar Christian Hesse1-4/+9
2019-01-09check-certificates: include the issuer in notificationsGravatar Christian Hesse1-0/+4
2019-01-09check-certificates: update CommonName after renewalGravatar Christian Hesse1-0/+1
2019-01-09super-mario-theme: simplify array accessGravatar Christian Hesse1-1/+1
2019-01-09daily-psk: simplify algorithmGravatar Christian Hesse1-21/+13
2019-01-09check-certificates: use time functionalityGravatar Christian Hesse1-25/+10
No need to calculate that...
2019-01-09check-certificates: send notification on renewalGravatar Christian Hesse1-8/+18
2019-01-09check-certificates: drop extra warningGravatar Christian Hesse1-2/+0
A sent notification implies that renewal failed.
2019-01-04ppp-on-up: just release ipv6 leaseGravatar Christian Hesse1-6/+1
This should get a new lease immediately.
2019-01-04ppp-on-up: run scripts if availableGravatar Christian Hesse1-0/+11
2019-01-04update-tunnelbroker: get tunnelbroker config from interface commentGravatar Christian Hesse2-26/+20
2019-01-04email-backup: print to update from cloudGravatar Christian Hesse1-0/+3
2019-01-04ppp-on-up: fix variable handlingGravatar Christian Hesse1-1/+3
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-04global: variable names are CamelCaseGravatar Christian Hesse41-782/+775
___ _ ___ __ / _ )(_)__ _ / _/__ _/ /_ / _ / / _ `/ / _/ _ `/ __/ /____/_/\_, / /_/ \_,_/\__/ _ __ /___/ _ __ | | / /___ __________ (_)___ ____ _/ / | | /| / / __ `/ ___/ __ \/ / __ \/ __ `/ / | |/ |/ / /_/ / / / / / / / / / / /_/ /_/ |__/|__/\__,_/_/ /_/ /_/_/_/ /_/\__, (_) /____/ 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-03global-{config,functions}: move variables, make independentGravatar Christian Hesse4-9/+12
2019-01-03script-updates: add configuration versioningGravatar Christian Hesse3-0/+20
2019-01-03dhcp-to-dns: give time in short formatGravatar Christian Hesse1-1/+1
Note that a unit is required to make it a time value!
2019-01-03daily-psk-schedule: give time in short formatGravatar Christian Hesse1-1/+1
Note that a unit is required to make it a time value!
2019-01-02rename script 'check-lte-firmware-update' -> 'check-lte-firmware-upgrade'Gravatar Christian Hesse2-8/+8
That's the correct wording from commands..
2019-01-02add script 'unattended-lte-firmware-upgrade'Gravatar Christian Hesse1-0/+29
2019-01-02add template for script documentationGravatar Christian Hesse1-0/+47
2019-01-02README: add link to scroll upGravatar Christian Hesse1-0/+2
2019-01-02ignore all html filesGravatar Christian Hesse1-1/+1
2019-01-02Makefile: update links for generated htmlGravatar Christian Hesse1-1/+1
2019-01-02Makefile: update for extended functionalityGravatar Christian Hesse1-8/+17
This can handle new and multiple markdown files.
2019-01-02update-tunnelbroker: verify certificateGravatar Christian Hesse2-2/+58
2019-01-02update-tunnelbroker: move configuration to global-config...Gravatar Michael Gisbers2-19/+28
... 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-02capsman-download-packages: use upgrade command to force remote-cap upgradeGravatar Michael Gisbers1-1/+1
Signed-off-by: Michael Gisbers <michael@gisbers.de> Signed-off-by: Christian Hesse <mail@eworm.de>
2019-01-02check-routeros-update: be more verbose on errorGravatar Christian Hesse1-1/+1
2019-01-02check-routeros-update: do not fail if safe-update-url return errorGravatar Christian Hesse1-6/+11
We still want the notification...
2019-01-02update copyright for 2019Gravatar Christian Hesse43-44/+44
2018-12-28global-functions: properly define global functionsGravatar Christian Hesse4-3/+2
2018-12-28global-functions: update comment in $SendNotificationGravatar Christian Hesse1-1/+1
2018-12-28global-functions: add $DownloadPackageGravatar Christian Hesse2-8/+30
... and make script 'capsman-download-packages' use it.
2018-12-28capsman-download-packages: move condition to loopGravatar Christian Hesse1-17/+16
2018-12-27remove script 'remove-packages'Gravatar Christian Hesse1-19/+0
Use script 'capsman-download-packages' to download and cleanup packages...
2018-12-27capsman-download-packages: act in package-path onlyGravatar Christian Hesse1-1/+4
2018-12-27capsman-download-packages: do not restart service...Gravatar Christian Hesse1-2/+2
... but disconnect old CAPs and force reconnect with update.
2018-12-27capsman-download-packages: rewrite package-name from wireless@ to wirelessGravatar Michael Gisbers1-0/+4
Signed-off-by: Michael Gisbers <michael@gisbers.de> Signed-off-by: Christian Hesse <mail@eworm.de>
2018-12-27add script 'capsman-download-packages'Gravatar Christian Hesse1-0/+34
2018-12-27global-functions: add $GetMacVendorGravatar Christian Hesse4-24/+21
2018-12-21remove-packages: delay if uptime less than one minuteGravatar Christian Hesse1-0/+2
2018-12-20global-functions: make $CertificateAvailable work on CommonNameGravatar Christian Hesse10-148/+147
This should prevent endless certificate switching for Let's Encrypt cross-signed intermediate certificates.
2018-12-20README: add Root CA certificate DST Root CA X3Gravatar Christian Hesse3-5/+34
This is used by Let's Encrypt to cross-sign.
2018-12-20check-certificates: support auto-renew of certificatesGravatar Christian Hesse2-10/+49
2018-12-19update-gre-address: remove settings from global-configGravatar Christian Hesse2-21/+9
Instead read infos from gre interface comment.
2018-12-19ipv6-update: remove settings from global-configGravatar Christian Hesse2-21/+12
Instead make it more robust by reading comments.
2018-12-18email-backup: support cloud backupGravatar Christian Hesse2-7/+30
2018-12-18README: add initial commands for copy and pasteGravatar Christian Hesse2-0/+28
2018-12-17check-lte-firmware-update: strip the extra line breakGravatar Christian Hesse1-0/+2
2018-12-14add script 'check-lte-firmware-update'Gravatar Christian Hesse2-0/+33
2018-12-14collect-wireless-mac: send the mac's vendor part onlyGravatar Christian Hesse3-3/+3
2018-12-14collect-wireless-mac: get and record the vendorGravatar Christian Hesse3-6/+36
2018-12-13email-backup: try without delayGravatar Christian Hesse1-2/+0
2018-12-12remove extra dollar signGravatar Christian Hesse5-9/+9
2018-12-12email-backup: send backup and config export in one mailGravatar Christian Hesse1-20/+23
2018-12-12email-backup: export terseGravatar Christian Hesse1-2/+2
2018-11-28global-functions: add identity tag in $SendNotificationGravatar Christian Hesse9-11/+13
... and send subject in telegram message.
2018-11-26global-config: add identity tagGravatar Christian Hesse1-1/+1
2018-11-26ip-addr-bridge: ignore bridges without portsGravatar Christian Hesse1-4/+6
Bridges are used for loopback... Assume we do not want to disable addresses if the bridge has no ports.
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-11-09global-functions: use 'print count-only'Gravatar Christian Hesse1-1/+1
2018-11-09check-routeros-update: use 'print count-only'Gravatar Christian Hesse1-1/+1
2018-11-09learn-mac-based-vlan: move log inside conditionGravatar Christian Hesse1-3/+2
2018-11-09learn-mac-based-vlan: use 'print count-only'Gravatar Christian Hesse1-1/+1
2018-11-09dhcp-to-dns: use 'print count-only'Gravatar Christian Hesse1-1/+1
2018-11-09lease-script: use 'print count-only'Gravatar Christian Hesse1-1/+1
2018-11-09add script 'ip-addr-bridge'Gravatar Christian Hesse1-0/+14
2018-11-09accesslist-duplicates: support interactive removalGravatar Christian Hesse3-0/+27
2018-11-09global-functions: add function to read user inputGravatar Christian Hesse1-0/+5
2018-10-25bridge-port-to-default: delay only when requiredGravatar Christian Hesse1-3/+5
2018-10-25bridge-port-to-default: delay for global-configGravatar Christian Hesse1-0/+3
All scripts scheduled with "start-time=startup interval=0" start simultaneously, thus racing on global variables. So delay for a second and give global-config time to finish.
2018-10-25bridge-port-to-default: drop unused code, :toarray strips itselfGravatar Christian Hesse1-3/+0
2018-10-25bridge-port-to-default: fix variable nameGravatar Christian Hesse1-1/+1
2018-10-16script-updates: run global-functions on updateGravatar Christian Hesse1-0/+3
2018-10-16README: do not print the certificates but count themGravatar Christian Hesse1-5/+4
2018-10-16README: download certificates from repositoryGravatar Christian Hesse3-18/+69
2018-10-16global-functions: import certificates if requiredGravatar Christian Hesse3-3/+76
Signed-off-by: Christian Hesse <mail@eworm.de>
2018-10-15daily-psk: add error handling for fetchGravatar Christian Hesse1-4/+9
2018-10-15global-functions: fix missing colonGravatar Christian Hesse1-2/+2
2018-10-12global-functions: make sure parameters are stringsGravatar Christian Hesse1-6/+7
2018-10-12add script 'daily-psk-schedule'Gravatar Christian Hesse2-12/+23
2018-10-12netwatch-syslog: set dont-require-permissions=yesGravatar Christian Hesse1-2/+2
... and drop the scheduler workaround.
2018-10-12script-updates: allow to set dont-require-permissions=yesGravatar Christian Hesse1-1/+4
This requires the new script to contain a line: # requires: dont-require-permissions=yes
2018-10-11mode-button-event: decrease interval, but update start timeGravatar Christian Hesse1-3/+8
2018-10-10global: remove unused variablesGravatar Christian Hesse7-14/+0
2018-10-10daily-psk: merge with email-daily-pskGravatar Christian Hesse2-68/+44
2018-10-10daily-psk: move function GeneratePSK from global-functionsGravatar Christian Hesse2-43/+41
2018-10-10check-routeros-update: send notification on auto-updateGravatar Christian Hesse1-0/+3
2018-10-10global-config: default for telegram is empty strings...Gravatar Christian Hesse1-2/+4
... to make sure the api is not flooded with invalid requests.
2018-10-09README: now that we need three scripts... download and add in loopGravatar Christian Hesse1-3/+1
2018-10-09global-functions: add UrlEncode and use in SendNotificationGravatar Christian Hesse1-1/+25
2018-10-09sms-forward: use function for notificationGravatar Christian Hesse1-3/+4
2018-10-09check-routeros-update: use function for notificationGravatar Christian Hesse1-3/+4
2018-10-09check-certificates: use function for notificationGravatar Christian Hesse1-3/+4
2018-10-09collect-wireless-mac: use function for notificationGravatar Christian Hesse3-9/+12
2018-10-09email-daily-psk: use function for notificationGravatar Christian Hesse1-4/+5
2018-10-09global-functions: add function to notify via e-mail and telegramGravatar Christian Hesse2-0/+40
2018-10-09global-functions: move daily psk secrets to global-configGravatar Christian Hesse2-17/+20