2009-03-01 05:35:18 -08:00
#!/bin/bash
#
### BEGIN INIT INFO
2010-09-13 03:40:16 +00:00
# Provides: glusterd
2012-10-01 16:07:09 -04:00
# Required-Start: $remote_fs $network
# Required-Stop: $remote_fs $network
2009-03-01 05:35:18 -08:00
# Default-Start: 3 5
# Default-Stop:
2010-09-13 03:40:16 +00:00
# Short-Description: Gluster File System service for volume management
# Description: Gluster File System service for volume management
2009-03-01 05:35:18 -08:00
### END INIT INFO
# Get function from functions library
. /etc/rc.status
2010-09-13 03:40:16 +00:00
BASE=glusterd
GLUSTERD_BIN=@prefix@/sbin/$BASE
GLUSTERD_OPTS=""
GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS"
2009-03-01 05:35:18 -08:00
RETVAL=0
# Start the service $BASE
start()
{
echo -n $"Starting $BASE:"
2010-09-13 03:40:16 +00:00
startproc $GLUSTERD
2009-03-01 05:35:18 -08:00
return $?
}
# Stop the service $BASE
stop()
{
echo $"Stopping $BASE:"
2010-09-13 03:40:16 +00:00
killproc $BASE
2009-03-01 05:35:18 -08:00
return $?
}
### service arguments ###
case $1 in
start)
start || {
rc_status -v
rc_exit
}
rc_status -v
;;
stop)
stop || {
rc_status -v
rc_exit
}
rc_status -v
;;
status)
2010-09-13 03:40:16 +00:00
echo -n " glusterd"
2009-03-01 05:35:18 -08:00
if ! checkproc $BASE ;then
echo " not running"
rc_failed 3
fi
rc_status -v
;;
2012-10-01 16:08:00 -04:00
reload)
rc_failed 3
rc_status -v
;;
2009-03-01 05:35:18 -08:00
restart)
$0 stop
$0 start
rc_status
;;
*)
2012-10-01 16:08:00 -04:00
echo $"Usage: $0 {start|stop|status|reload|restart}."
2009-03-01 05:35:18 -08:00
exit 1
esac
exit 0