From 993edcc972269424901357578568b48af70a6a63 Mon Sep 17 00:00:00 2001 From: Balamurugan Arumugam Date: Mon, 13 Sep 2010 03:40:16 +0000 Subject: extras: modify run level scripts to support glusterd. Signed-off-by: Bala.JA Signed-off-by: Pavan Vilas Sondur Signed-off-by: Vijay Bellur BUG: 1589 (Change init.d scripts to include glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1589 --- extras/init.d/glusterd-Redhat.in | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100755 extras/init.d/glusterd-Redhat.in (limited to 'extras/init.d/glusterd-Redhat.in') diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in new file mode 100755 index 000000000..15da24687 --- /dev/null +++ b/extras/init.d/glusterd-Redhat.in @@ -0,0 +1,53 @@ +#!/bin/bash +# +# chkconfig: 35 90 12 +# description: Gluster File System service for volume management +# + +# Get function from functions library +. /etc/rc.d/init.d/functions + +BASE=glusterd +GLUSTERD_BIN=@exec_prefix@/sbin/$BASE +GLUSTERD_OPTS="" +GLUSTERD="$GLUSTERD_BIN $GLUSTERD_OPTS" +RETVAL=0 + +# Start the service $BASE +start() +{ + echo $"Starting $BASE:" + daemon $GLUSTERD + RETVAL=$? + [ $RETVAL -ne 0 ] && exit $RETVAL +} + +# Stop the service $BASE +stop() +{ + echo $"Stopping $BASE:" + killproc $BASE +} + + +### service arguments ### +case $1 in + start) + start + ;; + stop) + stop + ;; + status) + status $BASE + ;; + restart) + $0 stop + $0 start + ;; + *) + echo $"Usage: $0 {start|stop|status|restart}." + exit 1 +esac + +exit 0 -- cgit