"Fossies" - the Fresh Open Source Software Archive

Member "freeha-1.0/alerthasrv" (23 Nov 2006, 914 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 gets called when the freehad demon changes states.           #
    5 #  (ie from 'INITIAL' to 'RUNNING')                                       #
    6 #  successfully does so, etc. etc.                                        #
    7 #  You dont have to have anything in here. This script exists for those   #
    8 #  people that want automatic notification every time ha services change  #
    9 #  their status.                                                          #
   10 #                                                                         #
   11 #-------------------------------------------------------------------------#
   12 
   13 
   14 #  Args passed in:
   15 #  "$1" == numerical value of state  [see "freehad.h" for the enum list]
   16 #  "$2" == string representation of state
   17 
   18 # mailx -s  "`uname -n` freehad changed state to $2"  admin@yourhost.com
   19 
   20 
   21 exit 0