Contact Us | Products/Services | Korn Shell | MicroEMACS


AIXtm mtXIA Technical Consulting Group

 


mtxeai02 MQHA Startup


Path : Home : Standards : MQSeries


Current:mtxeai02 MQHA Startup
Previous:mtxeai02 Scripts
Home Page

This is the script used to start MQSeries in the HACMP environment.



#!/bin/ksh

TMPFILE="/tmp/tmp${$}.tmp"

su mqm -c /MQHA/bin/hamqm_start_su $*

# 
# Search the /etc/inetd.conf file for MQSeries listeners
# which are commented out and correspond with the
# associated Queue Manager running this script.  If
# found, uncomment the listener(s), overwrite the
# /etc/inetd.conf file with the new modified version, and
# refresh the "inetd" process.
# 
# DLF if sed -e "s/^#[$' \t']*\(.*[$' \t']amqcrsta[$' \t'].*${1}.*\)/\1/g\
# DLF ;s/^[$' \t'][$' \t']*//g" \

if sed -e "s/^#[$' \t']*\(.*[$' \t']amqcrsta[$' \t'].*${1}.*\)/\1/g" \
< /etc/inetd.conf \
> ${TMPFILE}
then
  print "Successfully modified /etc/inetd.conf" | tee /dev/console
  if cp ${TMPFILE} /etc/inetd.conf
  then
    print "Successfully replaced /etc/inetd.conf" | tee /dev/console
    if refresh -s inetd
    then
      print "Successfully refreshed the inetd daemon" | tee /dev/console
    else
      print "ERROR: Unable to refresh the inetd daemon" | tee /dev/console 1>&2
    fi
  else
    print "ERROR: Unable to copy to /etc/inetd.conf" | tee /dev/console 1>&2
  fi
else
  print "ERROR: Unable to uncomment listeners from /etc/inetd.conf" | tee /dev/console 1>&2
fi
[[ -f ${TMPFILE} ]] && rm -f ${TMPFILE}


 

For information regarding this page, contact Dana French ( dfrench@mtxia.com )
Copyright 2008 by Mt Xia Inc, All Rights Reserved