Service Script Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx

        su - oracle -c "/service1/rcs/start_oracle.sh"

        ;;

 

  stop)

        /bin/echo $STOPMSG | /bin/mail -s "RED HAT CLUSTER SERVICE" my.email@xxxxxxxxxxxxx

        su - oracle -c "/service1/rcs/stop_oracle.sh"

        ;;

esac

exit

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux