summaryrefslogtreecommitdiffstats
path: root/extras/init.d/glusterd-Redhat.in
diff options
context:
space:
mode:
Diffstat (limited to 'extras/init.d/glusterd-Redhat.in')
-rwxr-xr-xextras/init.d/glusterd-Redhat.in70
1 files changed, 35 insertions, 35 deletions
diff --git a/extras/init.d/glusterd-Redhat.in b/extras/init.d/glusterd-Redhat.in
index 6e1260e5cda..01a3009470e 100755
--- a/extras/init.d/glusterd-Redhat.in
+++ b/extras/init.d/glusterd-Redhat.in
@@ -1,6 +1,6 @@
#!/bin/bash
#
-# chkconfig: 35 90 12
+# chkconfig: 35 20 80
# description: Gluster File System service for volume management
#
@@ -18,54 +18,54 @@ RETVAL=0
# Start the service $BASE
start()
{
- echo -n $"Starting $BASE:"
- daemon $GLUSTERD
- RETVAL=$?
- echo
- [ $RETVAL -ne 0 ] && exit $RETVAL
+ echo -n $"Starting $BASE:"
+ daemon $GLUSTERD
+ RETVAL=$?
+ echo
+ [ $RETVAL -ne 0 ] && exit $RETVAL
}
# Stop the service $BASE
stop()
{
- echo -n $"Stopping $BASE:"
- killproc $BASE
- echo
- pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null
- [ $? -eq 0 ] && killproc $GLUSTERFSD &> /dev/null
+ echo -n $"Stopping $BASE:"
+ killproc $BASE
+ echo
+ pidof -c -o %PPID -x $GLUSTERFSD &> /dev/null
+ [ $? -eq 0 ] && killproc $GLUSTERFSD &> /dev/null
#pidof -c -o %PPID -x $GLUSTERFS &> /dev/null
#[ $? -eq 0 ] && killproc $GLUSTERFS &> /dev/null
-
- if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then
- pid=`cat /etc/glusterd/nfs/run/nfs.pid`;
- cmd=`ps -p $pid -o comm=`
- if [ $cmd == "glusterfs" ]; then
- kill `cat /etc/glusterd/nfs/run/nfs.pid`
- fi
- fi
+ if [ -f /etc/glusterd/nfs/run/nfs.pid ] ;then
+ pid=`cat /etc/glusterd/nfs/run/nfs.pid`;
+ cmd=`ps -p $pid -o comm=`
+
+ if [ $cmd == "glusterfs" ]; then
+ kill `cat /etc/glusterd/nfs/run/nfs.pid`
+ fi
+ fi
}
### 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
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status $BASE
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|status|restart}."
+ exit 1
esac
exit 0