mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
testing/pacemaker: add missing initd
This commit is contained in:
parent
5d145f8451
commit
49c8fbfcc3
39
testing/pacemaker/pacemaker.initd
Normal file
39
testing/pacemaker/pacemaker.initd
Normal file
@ -0,0 +1,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/files/pacemaker.initd,v 1.1 2011/02/21 14:39:28 ultrabug Exp $
|
||||
|
||||
PIDFILE=/var/run/pacemaker.pid
|
||||
|
||||
depend() {
|
||||
need net corosync
|
||||
use syslog
|
||||
}
|
||||
|
||||
start() {
|
||||
nc=0
|
||||
ebegin "Starting Pacemaker Cluster Manager"
|
||||
einfon "Waiting for Corosync startup ."
|
||||
while true; do
|
||||
/usr/sbin/corosync-cfgtool -s &>/dev/null && break
|
||||
nc=$(expr $nc + 1)
|
||||
if [ $nc -gt 30 ]; then
|
||||
echo
|
||||
eend 1 "Failed to detect Corosync startup, is it really running ?"
|
||||
exit 1
|
||||
fi
|
||||
sleep 1
|
||||
echo -n "."
|
||||
done
|
||||
echo
|
||||
start-stop-daemon --start -q --exec /usr/sbin/pacemakerd \
|
||||
--pidfile "${PIDFILE}" --make-pidfile --background \
|
||||
-- -f
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Pacemaker Cluster Manager"
|
||||
start-stop-daemon --stop -q --pidfile "${PIDFILE}"
|
||||
eend $?
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user