[Linux-cluster] Service Script Question

Pepin, Jason Edward jason.e.pepin at Vanderbilt.Edu
Tue Aug 10 13:22:03 UTC 2010


I have custom scripts located in /usr/share/cluster, they are associated with each service in the cluster and execute when the service starts/stops.  At the beginning of the start/stop sections I have a definition to send me an email when the service starts/stops.  Whenever I update the cluster config by issuing the command "ccs_tool update /etc/cluster/cluster.conf", for each service already running I get the email stating the cluster service is starting even thought it doesn't because it already is running.  I cannot seem to figure out why this is.  Here is an example of my script in /usr/share/cluster.  Everything works great, I am just stumped as to why I get email about the services starting anytime I update the cluster.conf file.  Any incite is appreciated.

#!/bin/sh
#
# Cluster service script to start/stop oracle
#
HOSTNAME=`/bin/hostname`
SVCNAME="service1"
STARTMSG="Starting $SVCNAME on node $HOSTNAME"
STOPMSG="Stopping $SVCNAME on node $HOSTNAME"

case $1 in
  start)
        /bin/echo $STARTMSG | /bin/mail -s "RED HAT CLUSTER SERVICE" my.email at somewhere.com
        su - oracle -c "/service1/rcs/start_oracle.sh"
        ;;

  stop)
        /bin/echo $STOPMSG | /bin/mail -s "RED HAT CLUSTER SERVICE" my.email at somewhere.com
        su - oracle -c "/service1/rcs/stop_oracle.sh"
        ;;
esac
exit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-cluster/attachments/20100810/a2eb452d/attachment.htm>


More information about the Linux-cluster mailing list