/etc/init.d/glusterfs-server is in glusterfs-server 3.4.2-1ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | #! /bin/sh
### BEGIN INIT INFO
# Provides: glusterfs-server
# Required-Start: $local_fs $remote_fs $network
# Required-Stop: $local_fs $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: GlusterFS server
# Description: GlusterFS is a cluster filesystem. This service
# provides the GlusterFS server functionality which
# is configured using the 'gluster' command.
### END INIT INFO
# Author: Chris AtLee <chris@atlee.ca>
# Patched by: Matthias Albert < matthias@linux4experts.de>
PATH=/sbin:/usr/sbin:/bin:/usr/bin
NAME=glusterd
SCRIPTNAME=/etc/init.d/$NAME
DAEMON=/usr/sbin/$NAME
PIDFILE=/var/run/$NAME.pid
GLUSTERD_OPTS=""
PID=`test -f $PIDFILE && cat $PIDFILE`
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
# Define LSB log_* functions.
. /lib/lsb/init-functions
do_start()
{
pidofproc -p $PIDFILE $DAEMON >/dev/null
status=$?
if [ $status -eq 0 ]; then
log_success_msg "glusterd service is already running with pid $PID"
else
log_daemon_msg "Starting glusterd service" "glusterd"
start-stop-daemon --start --quiet --oknodo --pidfile $PIDFILE --startas $DAEMON -- -p $PIDFILE $GLUSTERD_OPTS
log_end_msg $?
fi
}
do_stop()
{
log_daemon_msg "Stopping glusterd service" "glusterd"
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 "glusterd service is running with pid $PID"
else
log_failure_msg "glusterd service 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
|