I am trying to run a script that checks if a pptp-client is connected, if not then send an email. I don’t want it to send a mail every time the script runs so I am trying to do the foloowing
:global oldb1 “$b1”;
:global b1 [:len [/ppp active find where name=“b1”]];
btw, now mail will be sent when interface changes state, that is it becomes disconnected or becomes connected again. you have to check if state change is from true to false and then send the e-mail.