From 311475e67ca23f994d8d31d15a7f63afe1e09648 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 4 Oct 2018 13:58:29 +0200 Subject: [PATCH] add script 'bridge-port-toggle' ... to toggle between configuration 'default' and 'alt'. --- bridge-port-toggle | 15 +++++++++++++++ global-config | 1 + 2 files changed, 16 insertions(+) create mode 100644 bridge-port-toggle diff --git a/bridge-port-toggle b/bridge-port-toggle new file mode 100644 index 0000000..978ed2c --- /dev/null +++ b/bridge-port-toggle @@ -0,0 +1,15 @@ +#!rsc +# RouterOS script: bridge-port-toggle +# Copyright (c) 2013-2018 Christian Hesse +# +# toggle bridge ports between default and alt bridge + +:global "bridge-port-to"; + +:if ($"bridge-port-to" != "default") do={ + :set "bridge-port-to" "default"; +} else={ + :set "bridge-port-to" "alt"; +} + +/ system script run bridge-port-to-default; diff --git a/global-config b/global-config index 96843cc..91c9e74 100644 --- a/global-config +++ b/global-config @@ -47,6 +47,7 @@ 1="/ system script run leds-toggle-mode;"; 2="/ system shutdown;"; 3="/ system reboot;"; + 4="/ system script run bridge-port-toggle;"; # add more here... };