aboutsummaryrefslogtreecommitdiff
blob: d9d215852d5f1c6463e38423c41fc0e9bc624e8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

PIDFILE="/var/run/pcmk-mgmtd.pid"
BINARY="/usr/lib/heartbeat/mgmtd"

# Adjust on the installed stack
if [ -f /etc/init.d/corosync ]; then
   DEPEND="pacemaker"
   export HA_cluster_type="openais"
else
    DEPEND="heartbeat"
    export HA_cluster_type="heartbeat"
fi

depend() {
   need $DEPEND
}

start() {
   ebegin "Starting Pacemaker Management daemon"
   start-stop-daemon --start --pidfile "${PIDFILE}" -m -x ${BINARY} -b -- -v
   eend $?
}

stop() {
   ebegin "Stopping Pacemaker Management daemon"
   start-stop-daemon --stop --pidfile "${PIDFILE}"
   eend $?
}

restart() {
   ebegin "Restarting Pacemaker Management daemon"
   svc_stop
   svc_start
   eend $?
}