aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-cluster/pacemaker-gui/files/mgmtd.init')
-rw-r--r--sys-cluster/pacemaker-gui/files/mgmtd.init39
1 files changed, 39 insertions, 0 deletions
diff --git a/sys-cluster/pacemaker-gui/files/mgmtd.init b/sys-cluster/pacemaker-gui/files/mgmtd.init
new file mode 100644
index 000000000..d9d215852
--- /dev/null
+++ b/sys-cluster/pacemaker-gui/files/mgmtd.init
@@ -0,0 +1,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 $?
+}