News: This forum is now permanently frozen.
Pages: [1]
Topic: a somehow strange script problem  (Read 1024 times)
« on: August 14, 2012, 17:47:42 »
krid *
Posts: 1

ear all,

I'm using monowall for a couple of VPN connections since years now. From time to time some of my tunnels are getting out of
sync (they using dynamic IP Addresses) for a unknown reason.

If this happened I restart the whole IPSEC System via manual execution of the /etc/rc.newipsecdns script on the exec.php hidden
formula.
That worked so far, but now I decide to script this because I'm tired of getting phone calls in the middle of the night because a tunnel stops working  ;-).
Unfortunately a call of /etc/rc.newipsecdns vi the exec_raw formula results in a kind of loop, rc.newipsecdns seems to call them self again and again, which causes the whole box to crash..

I know this all is a bit tricky and the exec functions are unsupported but maybe one could give me a hint
a.) why is the behaviour so different in exec.php and exec_raw.php?
b.) is there any other, better way to restart ipsec after a dns change?

Thanks in advance!!

Dirk
« Reply #1 on: August 14, 2012, 23:42:56 »
Lennart Grahl ***
Posts: 153

You could probably use the scheduler of 1.8.0b if this problem occurs in a steady interval.

The only difference I can see between exec and exec_raw is that exec is using "exec" and exec_raw is using "fpassthru".
However, I experienced somewhat similar problems while executing a php script file in a php script. Using "require_once" works fine though.
 
Pages: [1]
 
 
Powered by SMF 1.1.20 | SMF © 2013, Simple Machines