2 # Start/stop HACluster service
4 .
/lib
/svc
/share
/smf_include.sh
6 ## Tracing with ebug version
8 # PCMK_trace_functions=1
12 export PCMK_ipc_type
=socket
13 export PCMK_logfile
=/var
/log
/hacluster
/pacemaker.log
15 export CLUSTER_USER
=hacluster
16 export CLUSTER_GROUP
=haclient
17 export PATH
=/usr
/gnu
/bin
:${PATH}
22 PACEMAKER_PROCESSES
=pacemaker
26 # all processes should log to the common folder /var/log/${MYNAME
27 [ ! -d /var
/log
/${MYNAME} ] && mkdir
-p /var
/log
/${MYNAME}
29 # dumps of crashs, check the folder for problems
30 [ ! -d /var
/lib
/pacemaker
/cores
] && mkdir
-p /var
/lib
/pacemaker
/cores
32 # runtime folder for sockets etc.
33 [ ! -d /var
/lib
/corosync
] && mkdir
-p /var
/lib
/corosync
36 touch /var
/log
/${MYNAME}/${MYNAME}.log
37 chown
${CLUSTER_USER}:${CLUSTER_GROUP} /var/log/${MYNAME}/${MYNAME}.log
38 [ ! -d /var
/run
/${MYNAME} ] && mkdir
-p /var
/run
/${MYNAME}
39 chown
-R ${CLUSTER_USER}:${CLUSTER_GROUP} /var/run/${MYNAME}
43 if [ "x${pid}" != "x" ]; then
52 sleep ${SLEEPINTERVALL}
53 ${APPPATH}${PACEMAKERD} &
58 # first try, graceful shutdown
59 pid
=`pgrep -f ${PACEMAKERD}`
60 if [ "x${pid}" != "x" ]; then
61 ${APPPATH}${PACEMAKERD} --shutdown
62 sleep ${SLEEPINTERVALL}
64 # second try, kill the rest
65 killapp
${APPPATH}${COROSYNC}
67 killapp
${PACEMAKER_PROCESSES}
83 echo "Usage: -bash { start | stop | restart}"