summaryrefslogtreecommitdiff
blob: a5548139d0c7c399214f82cb5287801a244f12aa (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-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-cluster/pacemaker-gui/files/mgmtd.init,v 1.1 2011/02/21 14:46:15 ultrabug Exp $

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 $?
}