blob: bbb28a736d4f343182699189f2448c4dedc826bd (
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
|
#!/sbin/runscript
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
PIDFILE=/var/run/glusterd.pid
depend() {
need net
before netmount
}
start() {
ebegin "Starting glusterd"
start-stop-daemon --start -q --exec /usr/sbin/glusterd \
--pidfile "${PIDFILE}" --make-pidfile --background \
-- -N
eend $?
}
stop() {
ebegin "Stopping glusterd"
start-stop-daemon --stop -q --pidfile "${PIDFILE}"
eindent
einfo "Unmounting GlusterFS filesystems"
umount -t fuse.glusterfs -a
einfo "Killing remaining GlusterFS processes"
for PID in $(find /var/lib/glusterd/ -type f -name "*.pid" -exec cat {} \;); do
kill "${PID}"
done
eoutdent
eend $?
}
|