File openstack-quantum.init of Package openstack-quantum.1429

#! /bin/sh
### BEGIN INIT INFO
# Provides:          quantum-server
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 5
# Default-Stop:      0 1 6
# Short-Description: quantum-server
# Description:       Provides the Quantum networking service
### END INIT INFO

PIDFILE=/var/run/quantum/quantum.pid
LOGFILE=/var/log/quantum/quantum.log

DAEMON=/usr/bin/quantum-server
DAEMON_ARGS="--log-file=$LOGFILE"
DAEMON_DIR=/var/run

export TMPDIR=/var/lib/quantum/tmp

if [ ! -x ${DAEMON} ] ; then
	exit 0
fi

. /etc/rc.status

case "$1" in
  start)
    echo -n "Starting quantum server" "quantum-server"
    startproc -t ${STARTUP_TIMEOUT:-5} -q $DAEMON $DAEMON_ARGS
    rc_status -v
    ;;
  stop)
    echo -n "Stopping quantum server" "quantum-server"
    killproc $DAEMON
    rc_status -v
    ;;
  restart|force-reload)
    $0 stop
    sleep 1
    $0 start
    ;;
  reload)
    ;;
  status)
    echo -n "Checking status of quantum server"
    /sbin/checkproc $DAEMON
    rc_status -v
    ;;
  *)
    echo $"Usage: $0 {start|stop|restart|force-reload|status}"
    exit 2
    ;;
esac

exit $?
openSUSE Build Service is sponsored by