blob: f27084750818de5d6fe064eaf8f31b0b54818398 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!rsc
# RouterOS script: ppp-on-up
# Copyright (c) 2013-2019 Christian Hesse <mail@eworm.de>
#
# run scripts on ppp up
# variable $interface is available in ppp on-up script
:local Interface $interface;
:local IntName [ / interface get $Interface name ];
:log info ("PPP interface " . $IntName . " is up.");
:local DhcpClient [ / ipv6 dhcp-client find where interface=$IntName ];
:if ([ :len $DhcpClient ] > 0) do={
/ ipv6 dhcp-client disable $DhcpClient;
:delay 1s;
/ ipv6 dhcp-client enable $DhcpClient;
}
:local Scripts {
"update-tunnelbroker"
}
:foreach Script in=$Scripts do={
:if ([ / system script print count-only where name=$Script ] > 0) do={
:log debug ("Running script from ppp-on-up: " . $Script);
/ system script run $Script;
}
}
|