routeros-scripts/bridge-port-toggle
Christian Hesse d5afc79eed global: drop script 'global-wait'
All scripts wait for the global functions on their own now.
2021-02-18 21:45:38 +01:00

21 lines
568 B
Plaintext

#!rsc by RouterOS
# RouterOS script: bridge-port-toggle
# Copyright (c) 2013-2021 Christian Hesse <mail@eworm.de>
# https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md
#
# toggle bridge ports between default and alt bridge
# https://git.eworm.de/cgit/routeros-scripts/about/doc/bridge-port.md
:global GlobalFunctionsReady;
:while ($GlobalFunctionsReady != true) do={ :delay 500ms; }
:global BridgePortTo;
:if ($BridgePortTo != "default") do={
:set BridgePortTo "default";
} else={
:set BridgePortTo "alt";
}
/ system script run bridge-port-to-default;