LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-22-2005, 11:41 PM   #1
jstrahm
LQ Newbie
 
Registered: Sep 2005
Location: Fort Wayne, Indiana
Distribution: debian, SuSE
Posts: 4

Rep: Reputation: 0
I want to write a DNS Failover script


I am some what new to DNS and Linux scripting.

I have a debian server in a remote secure location with power back up and will be mainly the primary nameserver for the domain names that I manage.

I want to write a shell script on this server that will check my main web production server (which is in a different physical location then my primary nameserver) and verify that it is up and running. If the web server does not respond, the shell script, then would point my domain name to a my back-up web server. My back-up web server is in a different physical location then my primary nameserver and my production web server.

I have done alot of searching for this topic, and mostly I have found web sites that advertise this service for a fee. I would like to do this myself.

Is there a linux command that I can run that would check a remote web server and verify if it is up or not?

Thank you for your help.
Joe
 
Old 09-23-2005, 01:08 AM   #2
Snowbat
Member
 
Registered: Jun 2005
Location: q3dm7
Distribution: Mandriva 2010.0 x86_64
Posts: 338

Rep: Reputation: 31
wget will return 0 when it sucessfully retrieves a document from a specified URL, or 1 if it fails. $? is a special variable that holds the return value of the previous command.

Happy scripting
 
Old 09-27-2005, 01:09 PM   #3
jstrahm
LQ Newbie
 
Registered: Sep 2005
Location: Fort Wayne, Indiana
Distribution: debian, SuSE
Posts: 4

Original Poster
Rep: Reputation: 0
Thumbs up

Thank you for your help!
I will give this a try.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
trying to write a startup script psytae Debian 5 09-09-2004 09:17 PM
How to write a Script Blake Linux - Software 6 07-18-2004 11:41 AM
write a script to go thru database mannoulla Linux - Software 0 06-14-2004 03:06 PM
how to write this script? MeganageM Linux - Newbie 1 03-10-2004 05:01 PM
Help with a script I need to write... cmfarley19 Programming 9 12-06-2003 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration