Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-backports > by-pkgid > 02e187ac78a5df3bb0dbed92ad53ba20 > files > 37

heartbeat-2.1.4-3mdv2010.2.x86_64.rpm

#!/bin/sh
#
#
# Description:	wrapper of OCF RA apache, based on original heartbeat RA. See
#		OCF RA apache for more information.
#
# Author:	Xun Sun <xunsun@cn.ibm.com>
# Support:	linux-ha@lists.linux-ha.org
# License:	GNU General Public License (GPL)
# Copyright:	(C) 2005 International Business Machines
#
# An example usage in /etc/ha.d/haresources: 
#       node1  10.0.0.170 apache::/opt/IBMHTTPServer/conf/httpd.conf
#       node1  10.0.0.170 IBMhttpd
#

. /etc/ha.d/resource.d//hto-mapfuncs

usage() {
    echo "usage: $0 [config-file-pathname] $LEGAL_ACTIONS"
    exit 1
}

case $# in
  1)	op=$1
	;;
  2)	OCF_RESKEY_configfile=$1; export OCF_RESKEY_configfile
	op=$2
	;;
  *)	usage
	;;
esac

OCF_TYPE=apache
OCF_RESOURCE_INSTANCE=${OCF_TYPE}_$OCF_RESKEY_configfile
export OCF_TYPE OCF_RESOURCE_INSTANCE

ra_execocf $op