I use the following script to control PPP connections (on-up in ppp profile ):
ping interface=[ / interface get $interface name ] address=($"remote-address") interval=00:00:05
After a PPP interface break, it remains running. Can you please tell me how to kill him?
eworm
April 16, 2019, 9:37am
2
I use the following script to control PPP connections (on-up in ppp profile ):
ping interface=[ / interface get $interface name ] address=($"remote-address") interval=00:00:05
After a PPP interface break, it remains running. Can you please tell me how to kill him?
Try this, replace “ppp-script” with your script name:
/ system script job remove [ find where script="ppp-script" ];
You should consider changing your script…
This script has no name, it is launched via the ppp profile and they are launched for each PPP connection.
eworm
April 18, 2019, 5:28am
4
Are there any other unique criteria to find your nameless script? If there are non you shout consider putting it into “/ system script”.
After all… what’s the purpose of this ping?
BTW, ping knows an option “count=” to limit its runtime.
Or you do it in a loop:
:while ([ / interface get $interface running ] = true) do={ :delay 5s; / ping interface=[ / interface get $interface name ] address=($"remote-address") count=1; }
(Edit: fixed typo in script)
Purpose: to check the life of the connection and to avoid the forced termination due to idle timeout.
Here is the profile:
/ppp profile add idle-timeout=1m local-address=10.0.0.1 name=ppp-in on-up="ping interface=[ / interface get \$interface name ] address=(\$\"remote-address\") interval=00:00:01" only-one=yes
Great idea with a while loop, thanks, now I’ll try.
Its worked!
Thank you very much!
eworm
April 18, 2019, 7:33am
7
Fixed the typo in original post. Thanks!