mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
add script 'bridge-port-toggle'
... to toggle between configuration 'default' and 'alt'.
This commit is contained in:
parent
17f64b48af
commit
311475e67c
2 changed files with 16 additions and 0 deletions
15
bridge-port-toggle
Normal file
15
bridge-port-toggle
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#!rsc
|
||||||
|
# RouterOS script: bridge-port-toggle
|
||||||
|
# Copyright (c) 2013-2018 Christian Hesse <mail@eworm.de>
|
||||||
|
#
|
||||||
|
# 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;
|
|
@ -47,6 +47,7 @@
|
||||||
1="/ system script run leds-toggle-mode;";
|
1="/ system script run leds-toggle-mode;";
|
||||||
2="/ system shutdown;";
|
2="/ system shutdown;";
|
||||||
3="/ system reboot;";
|
3="/ system reboot;";
|
||||||
|
4="/ system script run bridge-port-toggle;";
|
||||||
# add more here...
|
# add more here...
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue