diff options
author | Balamurugan Arumugam <bala@gluster.com> | 2010-09-13 03:40:16 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-13 03:05:46 -0700 |
commit | 993edcc972269424901357578568b48af70a6a63 (patch) | |
tree | 2d5cc192da4d2d31cc5305bbf0779d46d01892e6 /extras/init.d/glusterd-Redhat.in | |
parent | 288040196caa67b559ea668cef21284515109d94 (diff) |
extras: modify run level scripts to support glusterd.v3.1.0qa21
Signed-off-by: Bala.JA <bala@gluster.com>
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1589 (Change init.d scripts to include glusterd)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1589
Diffstat (limited to 'extras/init.d/glusterd-Redhat.in')
-rwxr-xr-x | extras/init.d/glusterd-Redhat.in | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in new file mode 100755 index 00000000000..15da246870a --- /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 |