From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- community/mfs/mfschunkserver | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100755 community/mfs/mfschunkserver (limited to 'community/mfs/mfschunkserver') diff --git a/community/mfs/mfschunkserver b/community/mfs/mfschunkserver new file mode 100755 index 000000000..b9567b703 --- /dev/null +++ b/community/mfs/mfschunkserver @@ -0,0 +1,38 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions + +PID=`pidof -o %PPID /usr/sbin/mfschunkserver` +case "$1" in + start) + stat_busy "Starting MooseFS Chunkserver Daemon" + if [ -z "$PID" ]; then + /usr/sbin/mfschunkserver start + fi + if [ ! -z "$PID" -o $? -gt 0 ]; then + stat_fail + else + PID=`pidof -o %PPID /usr/sbin/mfschunkserver` + echo $PID > /var/run/mfsmetalogger.pid + add_daemon mfschunkserver + stat_done + fi + ;; + stop) + stat_busy "Stopping MooseFS Chunkserver Daemon" + [ ! -z "$PID" ] && /usr/sbin/mfschunkserver stop &> /dev/null + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon mfschunkserver + stat_done + fi + ;; + restart) + $0 stop + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac -- cgit v1.2.3-54-g00ecf