Results 1 to 3 of 3
Hi all,
I just got the following code from security-forums.com, i think:
Code:
#!/bin/bash
while (-f "/var/run/pppkeepgoing.pid"){
/usr/bin/pppd call speedtch
sleep 10
}
And for some reason it doesn't work, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-14-2003 #1Just Joined!
- Join Date
- Sep 2003
- Location
- UK
- Posts
- 9
Script for restarting PPPd (needs fixing)
Hi all,
I just got the following code from security-forums.com, i think:
And for some reason it doesn't work, the errors are:Code:#!/bin/bash while (-f "/var/run/pppkeepgoing.pid"){ /usr/bin/pppd call speedtch sleep 10 }
Could someone please help me out, Thanks in advance.Code:/sbin/keepitup: line 3: syntax error near unexpected token `{' /sbin/keepitup: line 3: `while (-f "/var/run/pppkeepgoing.pid"){'
Kind Regards
Mark Rawson
- 10-14-2003 #2Linux Engineer
- Join Date
- Mar 2003
- Location
- U.S.A.
- Posts
- 1,025
I'd first double check your syntax from the msg/board you got it from. Letting them know it doesn't work on your sys. They may have made some cmd or syntax errors in the post.
If no syntax errors then you can try a cmd line of "restart pppd" or "rcnetwork restart pppd" depending on your distro. See what pops up on the screen and go from there.Dan
\"Keep your friends close and your enemies even closer\" from The Art of War by Sun Tzu\"
- 10-14-2003 #3Just Joined!
- Join Date
- Sep 2003
- Location
- UK
- Posts
- 9
Solved....The person who had posted the code finally replied to my query. Here is the correct code to make pppd start if not already started or quit due to errors:
Thanks for your help anyway.Code:#!/bin/bash while (test -e "/var/run/pppkeepgoing.pid"); do /usr/sbin/pppd call speedtch sleep 10 done


Reply With Quote
