summaryrefslogtreecommitdiff
path: root/package/openais/files/openais.init
blob: 25b2d897447eb005513610e8e3cd054202f0600d (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
#!/bin/sh
#PKG openais
#INIT 80
. /etc/rc.conf

case $1 in
autostop) ;;
autostart)
	test x"${corosync:-NO}" = x"NO" && exit 0
	exec sh $0 start
	;;
start)
	[ -d /var/lib/corosync ] || mkdir -p /var/lib/corosync
	mkdir -p /var/lib/heartbeat/crm 
	chown hacluster:haclient /var/lib/heartbeat/crm
	chmod 775 /var/lib/heartbeat/crm
	mkdir -p /var/lib/pengine
	chown hacluster /var/lib/pengine
	/usr/sbin/aisexec
  	;;
stop)
	kill $(pgrep -f corosync)
	;;
restart)
	sh $0 stop
	sh $0 start
	;;
*)
	echo "usage: $0 {start | stop | restart}"
	;;
esac
exit $?