I am trying to find a way to run a command after the wan link is up
and kill it after the link is down. I have tried changing the file
/etc/inc/interfaces.inc which seems to have the subroutine for taking
up and down the wan link.
I have tried adding my command in a form similar to the command used
in the script to set the default route and configure the interface
inside the function
and for killing myexec I have tried adding a command similar to the
ones in the interfaces.inc file, immediately after the similar lines
that kill dhcp client and the PPPoE client:
BUT after all this, my process is not starting and it is not stopped
if it was started when the wan goes up/down.
I have uploaded myexec into my m0n0wall and I have run it manually.
It runs fine and I can kill it by pid number( kill -9 pidnumber).
What can I do further to automate this action, as my changes to the
script seem to be useless?