Keeping pppd alive--how?
From: Phisherman (nobody_at_noone.com)
Date: 10/29/04
- Next message: William Witt: "SmartMedia Reader"
- Previous message: Daniel L Elliott: "mouse crashing"
- Next in thread: chris_at_nospam.com: "Re: Keeping pppd alive--how?"
- Reply: chris_at_nospam.com: "Re: Keeping pppd alive--how?"
- Reply: Phisherman: "Re: Keeping pppd alive--how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 29 Oct 2004 18:54:00 GMT
I have yet to solve this problem and I'm no Linux expert. I use
Fedora Core One (text only!) running Squid as my proxy server. I
wrote a script to dial up my ISP, wait 40 seconds, then start up Jay's
Firewall. It goes offline periodically, so I re-run this script
manually. (All I do is type ./s on the keyboard without using the
monitor.) Sometimes a family member will startup this script if I am
not present. I always have this computer logged in as root--I know
this not a good idea, but physical security is not a big concern.
What I have not been successful is writing a script to automate this
process.
Here's my script (called s) that dials up the ISP and starts the
firewall:
#!/bin/sh
#
./ppp-on
sleep 40s
./fire
Here's a hangup script I use to disconnect (works great!):
#!/bin/sh
#
killall pppd
What I want Linux to do (automatically) is to run the "s" script if
the modem loses the connection. What is the best way to do this? A
cron job? A looping script? Perhaps using the netstat command to do
the "test?"
Another thought. I need to easily disable running the s script if I
need to take the modem offline to make a phone call.
I appreciate any detailed suggestions. Thanks!
- Next message: William Witt: "SmartMedia Reader"
- Previous message: Daniel L Elliott: "mouse crashing"
- Next in thread: chris_at_nospam.com: "Re: Keeping pppd alive--how?"
- Reply: chris_at_nospam.com: "Re: Keeping pppd alive--how?"
- Reply: Phisherman: "Re: Keeping pppd alive--how?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|