diff options
Diffstat (limited to 'community/mfs/mfschunkserver')
-rwxr-xr-x | community/mfs/mfschunkserver | 38 |
1 files changed, 38 insertions, 0 deletions
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 |