updated on Wed Jan 25 20:08:56 UTC 2012
[aur-mirror.git] / glusterfs / glusterd
blob61cc264761f48d39ca7ecb275481948a59beac34
1 #!/bin/sh
2 # Thanks to igor
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 PID="/var/run/glusterd.pid"
9 case "$1" in
10 start)
11 stat_busy "Starting glusterd"
12 /usr/sbin/glusterd -p $PID &>/dev/null
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon glusterd
17 stat_done
20 stop)
21 stat_busy "Stopping glusterd"
22 kill -QUIT `cat "$PID"` &>/dev/null
23 if [ $? -ne 0 ]; then
24 stat_fail
25 else
26 rm_daemon glusterd
27 stat_done
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
39 exit 0