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/glusterfsd-Debian.in | |
| parent | 288040196caa67b559ea668cef21284515109d94 (diff) | |
extras: modify run level scripts to support glusterd.
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/glusterfsd-Debian.in')
| -rwxr-xr-x | extras/init.d/glusterfsd-Debian.in | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/extras/init.d/glusterfsd-Debian.in b/extras/init.d/glusterfsd-Debian.in deleted file mode 100755 index a0c83d535..000000000 --- a/extras/init.d/glusterfsd-Debian.in +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: glusterfsd -# Required-Start: $local_fs $network -# Required-Stop: $local_fs $network -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: gluster server -# Description: This file starts / stops the gluster server -### END INIT INFO - -# Author: Chris AtLee <chris@atlee.ca> -# Patched by: Matthias Albert < matthias@linux4experts.de> - -PATH=/sbin:/usr/sbin:/bin:/usr/bin -NAME=glusterfsd -SCRIPTNAME=/etc/init.d/$NAME -DAEMON=@prefix@/sbin/$NAME -PIDFILE=/var/run/$NAME.pid -CONFIGFILE=/etc/glusterfs/glusterfsd.vol -GLUSTERFS_OPTS="-f $CONFIGFILE" -PID=`test -f $PIDFILE && cat $PIDFILE` - - -# Gracefully exit if the package has been removed. -test -x $DAEMON || exit 0 - -# Load the VERBOSE setting and other rcS variables -. /lib/init/vars.sh - -# Define LSB log_* functions. -. /lib/lsb/init-functions - -check_config() -{ - if [ ! -f "$CONFIGFILE" ]; then - echo "Config file $CONFIGFILE is missing...exiting!" - exit 0 - fi -} - -do_start() -{ - check_config; - pidofproc -p $PIDFILE $DAEMON >/dev/null - status=$? - if [ $status -eq 0 ]; then - log_success_msg "glusterfs server is already running with pid $PID" - else - log_daemon_msg "Starting glusterfs server" "glusterfsd" - start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $GLUSTERFS_OPTS - log_end_msg $? - start_daemon -p $PIDFILE $DAEMON -f $CONFIGFILE - return $? - fi -} - -do_stop() -{ - log_daemon_msg "Stopping glusterfs server" "glusterfsd" - start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE - log_end_msg $? - rm -f $PIDFILE - killproc -p $PIDFILE $DAEMON - return $? -} - -do_status() -{ - pidofproc -p $PIDFILE $DAEMON >/dev/null - status=$? - if [ $status -eq 0 ]; then - log_success_msg "glusterfs server is running with pid $PID" - else - log_failure_msg "glusterfs server is not running." - fi - exit $status -} - -case "$1" in - start) - do_start - ;; - stop) - do_stop - ;; - status) - do_status; - ;; - restart|force-reload) - do_stop - sleep 2 - do_start - ;; - *) - echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 - exit 3 - ;; -esac - |
