Hi !

Lately after install of new hardware, I upgraded to FreeBSD 7.0 AMD64. Problem is that every few days (5 or so) computer network connection is lost, if I restart computer everything is OK again....

What I need is script that will determine if connection is valid and if not restarting the machine. I plan to run this script by cron every hour... I am very lousy with writing scripts of anykind, so I would need little help from you...

Script must do following things:
1. Check if connection is alive by pinging one site, www.google.com should be good example
2a) If connection is ok, script is finished
2b) There is no response following stuff must happen:
a.) Wait for 10 minutes (or some specified time) and try step 1 again if fails following thing are done
        b.) Write line into log that connection is failed
c.) Inject mail message to local sendmail instance (so that mail is sent after restart)
        d.) Reboot computer

If someone knows about script that does this things, I would be very thankful if he/she could help me. If not I would be thankful for any help in creating such script.

Thank you in advance.
Andy
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to