### Install Backup Partition Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/backup-partition.md Installs the backup-partition script. This is the initial setup step. ```bash $ScriptInstallUpdate backup-partition; ``` -------------------------------- ### Install Custom Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Installs a custom script named 'hello-world' using a specified base URL. Ensure the script name and base URL are correct for your setup. ```bash $ScriptInstallUpdate hello-world "base-url=https://git.eworm.de/cgit/routeros-scripts-custom/plain/" ``` -------------------------------- ### Install netwatch-dns script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-dns.md Installs or updates the netwatch-dns script. This is the initial setup step. ```bash $ScriptInstallUpdate netwatch-dns; ``` -------------------------------- ### Install or Update log-forward Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/log-forward.md Installs or updates the log-forward script. This is the initial setup step. ```routeros $ScriptInstallUpdate log-forward; ``` -------------------------------- ### Install and Update backup-upload Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/backup-upload.md Installs or updates the backup-upload script. This is the initial setup step. ```routeros $ScriptInstallUpdate backup-upload; ``` -------------------------------- ### Install OSPF to LED Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ospf-to-leds.md Use this command to install or update the ospf-to-leds script. Ensure you have the base installation requirements met. ```bash $ScriptInstallUpdate ospf-to-leds; ``` -------------------------------- ### Install script for ppp connection Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ppp-on-up.md Use this command to install the script. Ensure the script is named 'ppp-on-up'. ```bash $ScriptInstallUpdate ppp-on-up; ``` -------------------------------- ### Install Temperature Health Plugin Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Installs the plugin for monitoring temperature sensors. ```bash $ScriptInstallUpdate check-health,check-health.d/temperature; ``` -------------------------------- ### Install Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcpv6-client-lease.md Use this command to install the 'dhcpv6-client-lease' script. This is a prerequisite for configuring the DHCP client. ```bash $ScriptInstallUpdate dhcpv6-client-lease; ``` -------------------------------- ### Install Voltage Health Plugin Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Installs the plugin for monitoring voltage sensors. ```bash $ScriptInstallUpdate check-health,check-health.d/voltage; ``` -------------------------------- ### Install and Schedule for Legacy CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/daily-psk.md Installs the daily-psk script for legacy CAPsMAN setups and configures schedulers for daily and startup passphrase updates. ```routeros $ScriptInstallUpdate daily-psk.capsman; /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.capsman;" start-time=03:00:00; /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.capsman;" start-time=startup; ``` -------------------------------- ### Install notification-gotify module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/notification-gotify.md Install the notification-gotify module using the provided script command. This module cannot be used independently and requires the base installation. ```bash $ScriptInstallUpdate mod/notification-gotify; ``` -------------------------------- ### Install dhcpv4-server-lease script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcpv4-server-lease.md Use this command to install the script. Ensure the `$ScriptInstallUpdate` command is available in your environment. ```bash $ScriptInstallUpdate dhcpv4-server-lease; ``` -------------------------------- ### Install scriptrunonce module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/scriptrunonce.md Install the scriptrunonce module using the provided command. This is a prerequisite for using the module's functionality. ```bash $ScriptInstallUpdate mod/scriptrunonce; ``` -------------------------------- ### Install Custom Script from URL Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Fetches and installs a script from a specified URL. Ensure the `base-url` is correctly configured. ```routeros /system script import url="https://raw.githubusercontent.com/eworm-de/routeros-scripts/master/scripts/hello-world.rsc" base-url="https://raw.githubusercontent.com/eworm-de/routeros-scripts/master/scripts/" ``` -------------------------------- ### Install Ntfy Notification Module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/notification-ntfy.md Use this command to install the Ntfy notification module. Ensure you have the base installation. ```bash $ScriptInstallUpdate mod/notification-ntfy; ``` -------------------------------- ### Install DHCP Lease Comment Script for CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcp-lease-comment.md Use this command to install the DHCP lease comment script for legacy CAPsMAN setups. The base installation is a prerequisite. ```bash $ScriptInstallUpdate dhcp-lease-comment.capsman; ``` -------------------------------- ### Install backup-cloud script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/backup-cloud.md Installs or updates the backup-cloud script. This is a prerequisite for using the script. ```bash $ScriptInstallUpdate backup-cloud; ``` -------------------------------- ### Install Multiple Health Plugins Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Installs a combination of state, temperature, and voltage health plugins in a single command. ```bash $ScriptInstallUpdate check-health,check-health.d/state,check-health.d/temperature,check-health.d/voltage; ``` -------------------------------- ### Install Notification Matrix Module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/notification-matrix.md Installs the notification-matrix module. This is a prerequisite for using Matrix notifications. ```bash $ScriptInstallUpdate mod/notification-matrix; ``` -------------------------------- ### Install and Schedule for 'wifi' Package Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/daily-psk.md Installs the daily-psk script for the 'wifi' package and sets up two schedulers: one for nightly updates and one for startup. ```routeros $ScriptInstallUpdate daily-psk.wifi; /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.wifi;" start-time=03:00:00; /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.wifi;" start-time=startup; ``` -------------------------------- ### Install Notification Email Module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/notification-email.md Use this command to install the notification-email module. Ensure you have the base installation and necessary RouterOS version. ```bash $ScriptInstallUpdate mod/notification-email; ``` -------------------------------- ### Install and Schedule Firmware Upgrade Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/firmware-upgrade-reboot.md Install the firmware upgrade script and create a scheduler to run it on startup. Ensure the script name matches the one used in the scheduler. ```bash $ScriptInstallUpdate firmware-upgrade-reboot; /system/scheduler/add name=firmware-upgrade-reboot on-event="/system/script/run firmware-upgrade-reboot;" start-time=startup; ``` -------------------------------- ### Install and Update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/global-wait.md Use this command to install or update the 'global-wait' script. Ensure you have the necessary permissions. ```bash $ScriptInstallUpdate global-wait; ``` -------------------------------- ### Install ipv6-update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ipv6-update.md Installs the `ipv6-update` script. This is a prerequisite for its functionality. ```bash $ScriptInstallUpdate ipv6-update; ``` -------------------------------- ### Install Mode Button Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mode-button.md Execute this command in the terminal to install the mode-button script. ```routeros $ScriptInstallUpdate mode-button; ``` -------------------------------- ### Install ipsec-to-dns script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ipsec-to-dns.md Use this command to install or update the ipsec-to-dns script. ```bash $ScriptInstallUpdate ipsec-to-dns; ``` -------------------------------- ### Install State Health Plugin Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Installs the plugin for monitoring the state of fan and power supply unit sensors. ```bash $ScriptInstallUpdate check-health,check-health.d/state; ``` -------------------------------- ### Install check-perpetual-license script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-perpetual-license.md Use this command to install or update the check-perpetual-license script. ```bash $ScriptInstallUpdate check-perpetual-license; ``` -------------------------------- ### Install rolling CAP upgrade script for legacy CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/capsman-rolling-upgrade.md Use this command to install the script for rolling CAP upgrades when using the legacy CAPsMAN setup (`/caps-man`). ```bash $ScriptInstallUpdate capsman-rolling-upgrade.capsman; ``` -------------------------------- ### Install Cleanup Script and Add Scheduler for WiFi Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/hotspot-to-wpa.md Installs the hotspot-to-wpa-cleanup script for WiFi and adds a daily scheduler to run it. Ensure the script is installed before adding the scheduler. ```routeros $ScriptInstallUpdate hotspot-to-wpa-cleanup.wifi,dhcpv4-server-lease; /system/scheduler/add interval=1d name="hotspot-to-wpa-cleanup" on-event="/system/script/run hotspot-to-wpa-cleanup.wifi;" start-time=startup; ``` -------------------------------- ### Initial Certificate Import with check-certificates Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-certificates.md This example demonstrates how to use the check-certificates script for the initial import of a certificate. It involves creating a dummy certificate with a short lifetime, signing it, and then running the script to process it. ```bash /certificate/add name="example.com" common-name="example.com" subject-alt-name="DNS:example.com" days-valid=1; /certificate/sign example.com; /system/script/run check-certificates; ``` -------------------------------- ### Install DHCP Lease Comment Script for WiFi Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcp-lease-comment.md Use this command to install the DHCP lease comment script when using the 'wifi' package. Ensure the base installation is present. ```bash $ScriptInstallUpdate dhcp-lease-comment.wifi; ``` -------------------------------- ### Install Update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/update-tunnelbroker.md Use this command to install the update-tunnelbroker script. Ensure you have the base installation. ```bash $ScriptInstallUpdate update-tunnelbroker; ``` -------------------------------- ### Install and Schedule for Legacy Local Interface Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/daily-psk.md Installs the daily-psk script for legacy local wireless interfaces and sets up schedulers for daily and startup passphrase updates. ```routeros $ScriptInstallUpdate daily-psk.local; /system/scheduler/add interval=1d name=daily-psk on-event="/system/script/run daily-psk.local;" start-time=03:00:00; /system/scheduler/add name=daily-psk@startup on-event="/system/script/run daily-psk.local;" start-time=startup; ``` -------------------------------- ### Install check-certificates Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-certificates.md Use this command to install or update the check-certificates script. Ensure you have the necessary permissions. ```bash $ScriptInstallUpdate check-certificates; ``` -------------------------------- ### Install DHCP to DNS Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcp-to-dns.md Use this command to install or update the DHCP to DNS script. It requires the base installation of the script package. ```bash $ScriptInstallUpdate dhcp-to-dns; ``` -------------------------------- ### Install DHCP Lease Comment Script for Local Wireless Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcp-lease-comment.md Use this command to install the DHCP lease comment script for legacy local wireless interfaces. The base installation is required. ```bash $ScriptInstallUpdate dhcp-lease-comment.local; ``` -------------------------------- ### Install LED Mode Scripts Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/leds-mode.md Installs the necessary scripts for managing LED modes. Ensure you have the scripts available in your system. ```routeros $ScriptInstallUpdate leds-day-mode,leds-night-mode,leds-toggle-mode; ``` -------------------------------- ### Install LTE Firmware Upgrade Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-lte-firmware-upgrade.md Use this command to install the script. Ensure the script is available in your system's update path. ```bash $ScriptInstallUpdate check-lte-firmware-upgrade; ``` -------------------------------- ### Install and Update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ip-addr-bridge.md Use this command to install or update the ip-addr-bridge script. ```bash $ScriptInstallUpdate ip-addr-bridge; ``` -------------------------------- ### Run Installed Scripts Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Executes the 'global-config' and 'global-functions' scripts. This step applies the installed scripts and also sets up the scheduler for automatic loading at system startup. ```routeros /system/script { run global-config; run global-functions; }; ``` -------------------------------- ### Install Backup Email Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/backup-email.md Installs the backup-email script and its required notification-email module. Ensure the notification-email module is also configured for sending emails. ```bash $ScriptInstallUpdate mod/notification-email,backup-email; ``` -------------------------------- ### Install Update GRE Address Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/update-gre-address.md Use this command to install the script. It is required before scheduling it. ```bash $ScriptInstallUpdate update-gre-address; ``` -------------------------------- ### Install New Scripts Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Add new scripts from the repository by providing a comma-separated list of script names to the `$ScriptInstallUpdate` function. ```routeros $ScriptInstallUpdate check-certificates,check-routeros-update; ``` -------------------------------- ### Install ipcalc Module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/ipcalc.md Installs or updates the ipcalc module. This is a prerequisite for using its functions. ```bash $ScriptInstallUpdate mod/ipcalc; ``` -------------------------------- ### Schedule check-certificates to Run at Startup Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-certificates.md Configure a scheduler to run the check-certificates script specifically when the RouterOS device starts up. This ensures certificates are checked early in the boot process. ```bash /system/scheduler/add name=check-certificates@startup on-event="/system/script/run check-certificates;" start-time=startup; ``` -------------------------------- ### Standard GNU GPL Notice Source: https://github.com/eworm-de/routeros-scripts/blob/main/COPYING.md Include this notice at the start of each source file to state the exclusion of warranty and provide licensing information. Ensure it points to the full notice and includes copyright details. ```text Copyright (C) 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. You should have received a copy of the GNU General Public License along with this program. If not, see . ``` -------------------------------- ### Install Wireless MAC Collector Script (CAPsMAN) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/collect-wireless-mac.md Installs the script for devices managed by CAPsMAN. Ensure you have the ScriptInstallUpdate tool available. ```routeros $ScriptInstallUpdate collect-wireless-mac.capsman; ``` -------------------------------- ### Complete Base Installation Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/INITIAL-COMMANDS.md This script performs the complete base installation for RouterOS. It imports a root certificate, installs core scripts from a remote URL, and loads the configuration. Ensure the BaseUrl, CertCommonName, CertFileName, and CertFingerprint variables are correctly set for your environment. The script also handles renaming existing 'global-config-overlay' scripts with a timestamp. ```routeros :local BaseUrl "https://rsc.eworm.de/main/"; :local CertCommonName "Root YE"; :local CertFileName "Root-YE.pem"; :local CertFingerprint "e14ffcad5b0025731006caa43a121a22d8e9700f4fb9cf852f02a708aa5d5666"; :local CertSettings [ /certificate/settings/get ]; :if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || ($CertSettings->"builtin-trust-store") ~ "fetch" || ($CertSettings->"builtin-trust-store") = "all") && [ :len [ /certificate/builtin/find where common-name=$CertCommonName ] ] > 0)) do={ :put "Importing certificate..."; /tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value; :delay 1s; /certificate/import file-name=$CertFileName passphrase=""; :if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] != 1) do={ :error "Something is wrong with your certificates!"; }; :delay 1s; }; :put "Renaming global-config-overlay, if exists..."; /system/script/set name=("global-config-overlay-" . [ /system/clock/get date ] . "-" . [ /system/clock/get time ]) [ find where name="global-config-overlay" ]; :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ :put "Installing $Script..."; /system/script/remove [ find where name=$Script ]; /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ($BaseUrl . $Script . ".rsc") output=user as-value ]->"data"); }; :put "Loading configuration and functions..."; /system/script { run global-config; run global-functions; }; :if ([ :len [ /certificate/find where fingerprint=$CertFingerprint ] ] > 0) do={ :put "Renaming certificate by its common-name..."; :global CertificateNameByCN; $CertificateNameByCN $CertFingerprint; }; ``` -------------------------------- ### Install Wireless MAC Collector Script (WiFi Package) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/collect-wireless-mac.md Installs the script for devices using the 'wifi' package. Ensure you have the ScriptInstallUpdate tool available. ```routeros $ScriptInstallUpdate collect-wireless-mac.wifi; ``` -------------------------------- ### Install/Update SMS Action Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/sms-action.md Use this command to install or update the sms-action script. It requires the base installation to function. ```bash $ScriptInstallUpdate sms-action; ``` -------------------------------- ### Install telegram-chat and notification-telegram modules Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/telegram-chat.md Installs the necessary scripts and modules for Telegram chat functionality. Ensure this is run on each device that will participate in the chat. ```bash $ScriptInstallUpdate telegram-chat,mod/notification-telegram; ``` -------------------------------- ### Install Main Scripts Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Downloads and adds the main RouterOS scripts ('global-config', 'global-config-overlay', 'global-functions') to the system. It verifies server certificates and fetches script content from a remote URL. ```routeros :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value ]->"data"); }; ``` -------------------------------- ### Install rolling CAP upgrade script for wifi package Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/capsman-rolling-upgrade.md Use this command to install the script for rolling CAP upgrades when using the 'wifi' package (`/interface/wifi`). ```bash $ScriptInstallUpdate capsman-rolling-upgrade.wifi; ``` -------------------------------- ### Install packages-update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/packages-update.md Installs the packages-update script. This script is automatically executed by check-routeros-update if available. ```bash $ScriptInstallUpdate packages-update; ``` -------------------------------- ### Install Wireless MAC Collector Script (Local Interface) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/collect-wireless-mac.md Installs the script for devices using a legacy local wireless interface. Ensure you have the ScriptInstallUpdate tool available. ```routeros $ScriptInstallUpdate collect-wireless-mac.local; ``` -------------------------------- ### Install Single Script from 'next' Branch Source: https://github.com/eworm-de/routeros-scripts/blob/main/BRANCHES.md Use this command to install a specific script from the 'next' branch. Ensure the script name is correct and the base URL points to the desired branch. ```routeros $ScriptInstallUpdate script-name "base-url=https://rsc.eworm.de/next/"; ``` -------------------------------- ### Install and Update Netwatch Notify Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-notify.md Installs or updates the netwatch-notify script. This is a prerequisite for using the script's functionalities. ```bash $ScriptInstallUpdate netwatch-notify; ``` -------------------------------- ### Install Script for Legacy CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/capsman-download-packages.md Installs the script for downloading packages when using the legacy CAPsMAN configuration. Ensure the 'package-path' is set in your CAPsMAN configuration. ```routeros $ScriptInstallUpdate capsman-download-packages.capsman; ``` -------------------------------- ### Install and Update SMS Forward Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/sms-forward.md Installs or updates the sms-forward script. This command is typically run from the command line. ```bash $ScriptInstallUpdate sms-forward; ``` -------------------------------- ### Install Script for WiFi Package Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/capsman-download-packages.md Installs the script for downloading packages when using the 'wifi' package with CAPsMAN. Ensure the 'package-path' is set in your CAPsMAN configuration. ```routeros $ScriptInstallUpdate capsman-download-packages.wifi; ``` -------------------------------- ### Schedule Script to Run on Startup Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ip-addr-bridge.md Add this entry to the RouterOS scheduler to automatically run the ip-addr-bridge script when the system starts. ```routeros /system/scheduler/add name=ip-addr-bridge on-event="/system/script/run ip-addr-bridge;" start-time=startup; ``` -------------------------------- ### Install LTE Firmware Upgrade Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/unattended-lte-firmware-upgrade.md Installs the unattended LTE firmware upgrade script. Ensure you have a working broadband connection on the LTE interface before running. ```bash $ScriptInstallUpdate unattended-lte-firmware-upgrade; ``` -------------------------------- ### Install inspectvar Module Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/inspectvar.md Installs or updates the inspectvar module for RouterOS scripts. This command requires administrative privileges. ```bash $ScriptInstallUpdate mod/inspectvar; ``` -------------------------------- ### Configure Mode Button Event Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mode-button.md Set up the mode button to trigger the installed script on event. ```routeros /system/routerboard/mode-button/set enabled=yes on-event="/system/script/run mode-button;" ``` -------------------------------- ### Install and Set Hotspot-to-WPA Script for 'wifi' Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/hotspot-to-wpa.md This command installs and updates the 'hotspot-to-wpa.wifi' script and sets it as the 'on-login' script for hotspot users when using the 'wifi' package. ```routeros $ScriptInstallUpdate hotspot-to-wpa.wifi; /ip/hotspot/user/profile/set on-login="hotspot-to-wpa.wifi" [ find ]; ``` -------------------------------- ### Switch Complete Installation to 'next' Branch Source: https://github.com/eworm-de/routeros-scripts/blob/main/BRANCHES.md Modify the global configuration to point to the 'next' branch for all script updates. After editing the global-config-overlay, reload the configuration and run the update script to apply changes across the entire installation. ```routeros :global ScriptUpdatesBaseUrl "https://rsc.eworm.de/next/"; ``` ```routeros /system/script/run global-config; $ScriptInstallUpdate; ``` -------------------------------- ### Install and Update Firewall Address-lists Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/fw-addr-lists.md Use this command to install or update the firewall address-lists script. Ensure the script is available in your RouterOS environment. ```routeros $ScriptInstallUpdate fw-addr-lists; ``` -------------------------------- ### Schedule netwatch-dns script execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-dns.md Adds a scheduler to run the netwatch-dns script every minute. The script starts on system startup. ```routeros /system/scheduler/add interval=1m name=netwatch-dns on-event="/system/script/run netwatch-dns;" start-time=startup; ``` -------------------------------- ### Install Cleanup Script and Add Scheduler for Legacy CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/hotspot-to-wpa.md Installs the hotspot-to-wpa-cleanup script for legacy CAPsMAN and adds a daily scheduler to run it. This is for older CAPsMAN versions. ```routeros $ScriptInstallUpdate hotspot-to-wpa-cleanup.capsman,dhcpv4-server-lease; /system/scheduler/add interval=1d name="hotspot-to-wpa-cleanup" on-event="/system/script/run hotspot-to-wpa-cleanup.capsman;" start-time=startup; ``` -------------------------------- ### Schedule Script Updates Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Adds a scheduler to automatically update the installed scripts. The scheduler is named 'ScriptInstallUpdate', starts on system startup, and runs daily. ```routeros /system/scheduler/add name="ScriptInstallUpdate" start-time=startup interval=1d on-event=":global ScriptInstallUpdate; \$ScriptInstallUpdate;"; ``` -------------------------------- ### Interactive Mode Notice Source: https://github.com/eworm-de/routeros-scripts/blob/main/COPYING.md Display this short notice when a program starts in interactive mode to inform users about warranty and redistribution conditions. The commands 'show w' and 'show c' should provide further details. ```text Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. ``` -------------------------------- ### Install Wireless Access List Duplicates Script (Local Interface) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/accesslist-duplicates.md Installs the script for finding and removing duplicate entries in the wireless access list when using a legacy local wireless interface. ```routeros $ScriptInstallUpdate accesslist-duplicates.local; ``` -------------------------------- ### Schedule OSPF to LED Script Execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ospf-to-leds.md Add this scheduler entry to run the ospf-to-leds script every 20 seconds. The script will start automatically on device startup. ```routeros /system/scheduler/add interval=20s name=ospf-to-leds on-event="/system/script/run ospf-to-leds;" start-time=startup; ``` -------------------------------- ### Install Wireless Access List Duplicates Script (CAPsMAN) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/accesslist-duplicates.md Installs the script for finding and removing duplicate entries in the wireless access list when using legacy CAPsMAN. ```routeros $ScriptInstallUpdate accesslist-duplicates.capsman; ``` -------------------------------- ### Install Wireless Access List Duplicates Script (wifi) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/accesslist-duplicates.md Installs the script for finding and removing duplicate entries in the wireless access list when using the 'wifi' package. ```routeros $ScriptInstallUpdate accesslist-duplicates.wifi; ``` -------------------------------- ### Add Scheduler for Bridge Port VLAN Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/bridge-port-vlan.md Add a scheduler to run the bridge-port-vlan script on system startup. Requires the 'global-wait' script to be installed. ```routeros $ScriptInstallUpdate global-wait; /system/scheduler/add name=bridge-port-vlan on-event="/system/script/run global-wait; :global BridgePortVlan; $BridgePortVlan default;" start-time=startup; ``` -------------------------------- ### Install Certificate Renew Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/certificate-renew-issued.md Installs or updates the certificate-renew-issued script. Ensure you have the base installation for this script to function correctly. ```bash $ScriptInstallUpdate certificate-renew-issued; ``` -------------------------------- ### Schedule log-forward Script Execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/log-forward.md Adds a scheduler to run the log-forward script every minute. Ensure the script is installed before scheduling. ```routeros /system/scheduler/add interval=1m name=log-forward on-event="/system/script/run log-forward;" start-time=startup; ``` -------------------------------- ### Configure DHCP server to use lease script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/dhcpv4-server-lease.md Add the installed script as the `lease-script` to your DHCP server configuration. This command targets all DHCP servers. ```routeros /ip/dhcp-server/set lease-script="dhcpv4-server-lease" [ find ] ``` -------------------------------- ### Schedule GPS Tracking Script Execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/gps-track.md Add a scheduler entry to run the gps-track script every minute. The script will start automatically on device startup. ```routeros /system/scheduler/add interval=1m name=gps-track on-event="/system/script/run gps-track;" start-time=startup; ``` -------------------------------- ### Schedule license check at startup Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-perpetual-license.md Configure the scheduler to run the license check script specifically at system startup. ```routeros /system/scheduler/add name=check-perpetual-license@startup on-event="/system/script/run check-perpetual-license;" start-time=startup; ``` -------------------------------- ### Configure Netwatch Host for Dynamic DNS Updates (IPv6) Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-notify.md Adds a host to Netwatch with a 'resolve' parameter to dynamically update its IP address from DNS. This example specifically targets IPv6 (AAAA) records. ```routeros /tool/netwatch/add comment="notify, name=example.com, resolve=example.com" host=::; ``` -------------------------------- ### Install RouterOS Update Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-routeros-update.md Installs the check-routeros-update script. This is a prerequisite for using the update notification functionality. ```bash $ScriptInstallUpdate check-routeros-update; ``` -------------------------------- ### Install GPS Tracking Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/gps-track.md Use this command to install or update the gps-track script on your RouterOS device. ```bash $ScriptInstallUpdate gps-track; ``` -------------------------------- ### Set script as on-up for ppp profile Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ppp-on-up.md Configure the PPP profile to execute the 'ppp-on-up' script when a connection is established. ```routeros /ppp/profile/set on-up=ppp-on-up [ find ] ``` -------------------------------- ### Configure OSPF Instance for LED Visualization Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/ospf-to-leds.md Set the comment for a specific OSPF instance to link it to an LED. Replace 'default' with your OSPF instance name and 'user-led' with the desired LED identifier. ```routeros /routing/ospf/instance/set default comment="ospf-to-leds, leds=user-led"; ``` -------------------------------- ### Schedule Initial Firewall Address-list Import Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/fw-addr-lists.md Add this scheduler to perform an initial import of firewall address-lists upon RouterOS startup. This ensures lists are populated when the device boots. ```routeros /system/scheduler/add name="fw-addr-lists@startup" start-time=startup on-event="/system/script/run fw-addr-lists;" ``` -------------------------------- ### Install Super Mario Theme Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/super-mario-theme.md Use this command to install or update the super-mario-theme script on your RouterOS device. ```bash $ScriptInstallUpdate super-mario-theme; ``` -------------------------------- ### Configure DHCP Lease Script and DNS Update Source: https://github.com/eworm-de/routeros-scripts/blob/main/README.md Installs 'dhcp-to-dns' and 'dhcpv4-server-lease' scripts, sets the lease script for the DHCP server, and schedules the 'dhcp-to-dns' script to run every 5 minutes for DNS updates. ```routeros $ScriptInstallUpdate dhcp-to-dns,dhcpv4-server-lease; /ip/dhcp-server/set lease-script="dhcpv4-server-lease" [ find ]; /system/scheduler/add name="dhcp-to-dns" interval=5m start-time=startup on-event="/system/script/run dhcp-to-dns;" ``` -------------------------------- ### Schedule 'global-wait' Script at Startup Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/global-wait.md Add this script to the system scheduler to run at startup. It's often used with other module scripts, like 'bridge-port-vlan', to ensure dependencies are met before execution. ```routeros /system/scheduler/add name=bridge-port-vlan on-event="/system/script/run global-wait; :global BridgePortVlan; $BridgePortVlan default;" start-time=startup ``` -------------------------------- ### Install and Set Hotspot-to-WPA Script for CAPsMAN Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/hotspot-to-wpa.md This command installs and updates the 'hotspot-to-wpa.capsman' script and sets it as the 'on-login' script for hotspot users when using legacy CAPsMAN. ```routeros $ScriptInstallUpdate hotspot-to-wpa.capsman; /ip/hotspot/user/profile/set on-login="hotspot-to-wpa.capsman" [ find ]; ``` -------------------------------- ### Schedule Update Check at Startup Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-routeros-update.md Schedules the update check script to run once at system startup. This ensures an immediate check after the device boots. ```routeros /system/scheduler/add name=check-routeros-update@startup on-event="/system/script/run check-routeros-update;" start-time=startup; ``` -------------------------------- ### Schedule check-certificates for Daily Execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-certificates.md Create a scheduler entry to run the check-certificates script automatically every day. The script will execute on startup and then at the specified interval. ```bash /system/scheduler/add interval=1d name=check-certificates on-event="/system/script/run check-certificates;" start-time=startup; ``` -------------------------------- ### Add Access List Entry for 'wifi' Package Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/daily-psk.md Configures an access list entry for the 'wifi' package, setting a comment and a dynamic passphrase placeholder. ```routeros /interface/wifi/access-list/add comment="Daily PSK" ssid-regexp="-guest\$" passphrase="ToBeChangedDaily"; ``` -------------------------------- ### Install and Schedule Check-Health Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Installs or updates the check-health script and sets up a scheduler to run it periodically. The interval is set to 53s to avoid potential CPU utilization measurement inaccuracies on resource-limited devices. ```routeros $ScriptInstallUpdate check-health; /system/scheduler/add interval=53s name=check-health on-event="/system/script/run check-health;" start-time=startup; ``` -------------------------------- ### Create Scheduler for Firmware Check Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-lte-firmware-upgrade.md This command adds a scheduler to run the firmware check script daily. The script will execute automatically on startup and at the specified interval. ```routeros /system/scheduler/add interval=1d name=check-lte-firmware-upgrade on-event="/system/script/run check-lte-firmware-upgrade;" start-time=startup; ``` -------------------------------- ### Print Available Health Sensors Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/check-health.md Use this command to check which hardware sensors are supported by your device before installing plugins. ```routeros /system/health/print; ``` -------------------------------- ### Manually Run Package Download for WiFi Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/capsman-download-packages.md Manually triggers the script to download CAPsMAN packages for 'wifi' configurations. This is useful for immediate updates or testing. ```routeros /system/script/run capsman-download-packages.wifi; ``` -------------------------------- ### Configure netwatch with primary and fallback DNS servers Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-dns.md Sets up netwatch entries for a primary DNS server and a fallback DNS server. The script will use the fallback if the primary fails. ```routeros /tool/netwatch/add comment="dns" host=10.0.0.10; ``` ```routeros /tool/netwatch/add comment="dns-fallback" host=1.1.1.1; ``` -------------------------------- ### Send direct Gotify notification Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/notification-gotify.md Send a direct notification to the configured Gotify application. This function is available after the module is installed and configured. ```routeros $SendGotify "Subject..." "Body..."; ``` -------------------------------- ### Run a script from a URL Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/mod/scriptrunonce.md Execute a script located at a specific URL using the $ScriptRunOnce function. Ensure the URL is correctly formatted or that base URL and suffix configurations are in place. ```routeros $ScriptRunOnce https://rsc.eworm.de/main/doc/mod/scriptrunonce.d/hello-world.rsc; ``` -------------------------------- ### Schedule Netwatch Notify Script Execution Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/netwatch-notify.md Adds a scheduler to run the netwatch-notify script periodically. Ensure the script is installed before setting up the scheduler. ```routeros /system/scheduler/add interval=1m name=netwatch-notify on-event="/system/script/run netwatch-notify;" start-time=startup; ``` -------------------------------- ### Run Wireless Access List Duplicates Script Source: https://github.com/eworm-de/routeros-scripts/blob/main/doc/accesslist-duplicates.md Executes the installed script to find and remove duplicate entries from the wireless access list. ```routeros /system/script/run accesslist-duplicates.wifi; ```