Re: Script to stop and start named

From: Michael C. (mcsuper5_at_usol.com)
Date: 01/28/04


Date: 28 Jan 2004 07:56:49 GMT

On Wed, 28 Jan 2004 03:15:14 GMT,
Jibba Jabba <trutran@mailexcite.com> wrote:
> Is there a script out there that can monitor my dns server (bind) and
> restart it if it's not running? I'd like to put it in a cron job so
> that if it ever goes down a restart will be attempted.

I don't run a nameserver, so forgive any obvious mistakes, but
adding something similar to a cron job might work:

# The following two lines should be on one line
*/10 * * * * host myhost.mydomain mydns.mydomain ||
  /etc/init.d/named restart

I don't know if you are supposed to be able to count on host to return
non zero if the lookup fails. On my debian box host acts that way, on
my Redhat box host appears to return zero whether it is found or not.

Redhat's man page (RH 7.2) doesn't specify behavior, Debian's does.

HTH,

Michael C.

-- 
mcsuper5@usol.com http://mcsuper5.freeshell.org/
Registered Linux User #303915 http://counter.li.org/


Relevant Pages

  • Re: Script to stop and start named
    ... I'd like to put it in a cron job so ... >> that if it ever goes down a restart will be attempted. ... On my debian box host acts that way, ... So substituting dig for host in the cron job would work with RH9. ...
    (alt.os.linux)
  • Re: Biztalk slow to receive files after host instance restart
    ... Especially when you use the default BizTalk host configuration because the host is than also responsible for moving tracking information from msgbox db to tracking db. ... Give the SQL jobs some time to process the backlog and after that see if the host restart time gets better. ...
    (microsoft.public.biztalk.general)
  • Re: WinUSB resume
    ... It sounds like you aren't using UMDF at all, so the host automatic host restart would not be a part of the picture. ... Conceptually there are two types of stacks you could use WinUSB 1) WinUSB->UMDF framework->Your UMDF Driver Code or 2) WinUSB->Your user-mode service/application. ... Plug in a usb device to my PC, I monitor the current of the usb device is ...
    (microsoft.public.development.device.drivers)
  • Re: Biztalk slow to receive files after host instance restart
    ... Backup Biztalk Server ... On closer inspection the T-SQL statements that ran these jobs needed ... Especially when you use the default BizTalk host configuration ... host restart time gets better. ...
    (microsoft.public.biztalk.general)
  • Re: CreateFile() and FILE_FLAG_WRITE_THROUGH
    ... On restart, the file testfile.txt exists but is zero bytes long because although ... So our so-called safe write to disk, is in this situation completely useless! ... We can then happily cut the power, confident that the data will have been ...
    (microsoft.public.win32.programmer.kernel)