aboutsummaryrefslogtreecommitdiffstats
path: root/ppp-on-up
diff options
context:
space:
mode:
Diffstat (limited to 'ppp-on-up')
-rw-r--r--ppp-on-up13
1 files changed, 13 insertions, 0 deletions
diff --git a/ppp-on-up b/ppp-on-up
new file mode 100644
index 0000000..7940f2a
--- /dev/null
+++ b/ppp-on-up
@@ -0,0 +1,13 @@
+# RouterOS script: ppp-on-up
+# Copyright (c) 2013-2018 Christian Hesse <mail@eworm.de>
+#
+# run scripts on ppp up
+
+# variable $interface is available in ppp on-up script
+:local dhcpclient [ / ipv6 dhcp-client find where interface=$interface ];
+
+:if ( [ :len $dhcpclient ] > 0) do={
+ / ipv6 dhcp-client disable $dhcpclient;
+ :delay 1s;
+ / ipv6 dhcp-client enable $dhcpclient;
+}