Hello,
I have a VPN network and I made a script to check if ppp interfaces are brought on.
Code:
#!/bin/bash
X=`/sbin/ifconfig | grep ppp`
if [ -n "$X" ]; then # -n tests to see if the argument is non empty
echo ""
else
pon sofia
fi
When I execute the script manualy it works perfect, but I want it to make this check every 5 minutes, so I put it in crontab. Unfortunatelly it dowsn't work.
Code:
Oct 4 05:50:01 levski pppd[5382]: pppd 2.4.4b1 started by root, uid 0
Oct 4 05:50:01 levski pppd[5382]: Couldn't get channel number: Input/output error
Oct 4 05:50:01 levski last message repeated 4 times
Oct 4 05:50:01 levski pppd[5382]: Using interface ppp0
Oct 4 05:50:01 levski pppd[5382]: Connect: ppp0 <--> /dev/pts/1
Oct 4 05:50:01 levski pppd[5382]: Modem hangup
Oct 4 05:50:01 levski pppd[5382]: Connection terminated.
Oct 4 05:50:01 levski pppd[5382]: Couldn't get channel number: Input/output error
Oct 4 05:50:01 levski last message repeated 3 times
Oct 4 05:50:01 levski pppd[5382]: Exit.
Also I tried just to run pon from crontab without the script - same result.
Please, suggest
Best regards
Ipolit