"Fossies" - the Fresh Open Source Software Archive

Member "freeha-1.0/monitorhasrv" (23 Nov 2006, 928 Bytes) of package /linux/privat/old/freeha-1.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 
    3 #-------------------------------------------------------------------------#
    4 #  This file monitors that the services you want, are running.            #
    5 #  It is up to you to make sure it matches everyting in 'starthasrv'      #
    6 #  See the various templates for examples that are practically readytorun #
    7 #  with a minimum of tweaking                                             #
    8 #                                                                         #
    9 #  Standard UNIX status: returns 0 on good, non-0 on bad.                 #
   10 #-------------------------------------------------------------------------#
   11 
   12 
   13 # monitor our fake 'cat' service
   14 cat.monitor
   15 if [ $? -ne 0 ] ; then  exit 1; fi
   16 
   17 # You could have other 'xxx.monitor' commands in here, and you usually would.
   18 # Normally you'd probably have 3 or 4.
   19 # Examples:
   20 
   21 # vip.monitor  192.168.1.10 192.168.1.1 || exit 1
   22 
   23 # metaset.monitor metaset || exit 1
   24 
   25 
   26 exit 0