Rename to Neutron in sample init.d script

Related to LP Bug #1199794

Change-Id: I809a4d6c8e2ab047a1530f3fd6ef9aa60c0c638f
This commit is contained in:
Dirk Mueller 2013-07-13 11:08:29 +02:00 committed by Mark McClain
parent bd18990d78
commit 933498e861

View File

@ -1,51 +1,51 @@
#! /bin/sh #! /bin/sh
### BEGIN INIT INFO ### BEGIN INIT INFO
# Provides: quantum-server # Provides: neutron-server
# Required-Start: $remote_fs $syslog # Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog # Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5 # Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 # Default-Stop: 0 1 6
# Short-Description: quantum-server # Short-Description: neutron-server
# Description: Provides the Quantum networking service # Description: Provides the Neutron networking service
### END INIT INFO ### END INIT INFO
set -e set -e
PIDFILE=/var/run/quantum/quantum-server.pid PIDFILE=/var/run/neutron/neutron-server.pid
LOGFILE=/var/log/quantum/quantum-server.log LOGFILE=/var/log/neutron/neutron-server.log
DAEMON=/usr/bin/quantum-server DAEMON=/usr/bin/neutron-server
DAEMON_ARGS="--log-file=$LOGFILE" DAEMON_ARGS="--log-file=$LOGFILE"
DAEMON_DIR=/var/run DAEMON_DIR=/var/run
ENABLED=true ENABLED=true
if test -f /etc/default/quantum-server; then if test -f /etc/default/neutron-server; then
. /etc/default/quantum-server . /etc/default/neutron-server
fi fi
mkdir -p /var/run/quantum mkdir -p /var/run/neutron
mkdir -p /var/log/quantum mkdir -p /var/log/neutron
. /lib/lsb/init-functions . /lib/lsb/init-functions
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
export TMPDIR=/var/lib/quantum/tmp export TMPDIR=/var/lib/neutron/tmp
if [ ! -x ${DAEMON} ] ; then if [ ! -x ${DAEMON} ] ; then
exit 0 exit 0
fi fi
case "$1" in case "$1" in
start) start)
test "$ENABLED" = "true" || exit 0 test "$ENABLED" = "true" || exit 0
log_daemon_msg "Starting quantum server" "quantum-server" log_daemon_msg "Starting neutron server" "neutron-server"
start-stop-daemon -Sbmv --pidfile $PIDFILE --chdir $DAEMON_DIR --exec $DAEMON -- $DAEMON_ARGS start-stop-daemon -Sbmv --pidfile $PIDFILE --chdir $DAEMON_DIR --exec $DAEMON -- $DAEMON_ARGS
log_end_msg $? log_end_msg $?
;; ;;
stop) stop)
test "$ENABLED" = "true" || exit 0 test "$ENABLED" = "true" || exit 0
log_daemon_msg "Stopping quantum server" "quantum-server" log_daemon_msg "Stopping neutron server" "neutron-server"
start-stop-daemon --stop --oknodo --pidfile ${PIDFILE} start-stop-daemon --stop --oknodo --pidfile ${PIDFILE}
log_end_msg $? log_end_msg $?
;; ;;
@ -57,10 +57,10 @@ case "$1" in
;; ;;
status) status)
test "$ENABLED" = "true" || exit 0 test "$ENABLED" = "true" || exit 0
status_of_proc -p $PIDFILE $DAEMON quantum-server && exit 0 || exit $? status_of_proc -p $PIDFILE $DAEMON neutron-server && exit 0 || exit $?
;; ;;
*) *)
log_action_msg "Usage: /etc/init.d/quantum-server {start|stop|restart|force-reload|status}" log_action_msg "Usage: /etc/init.d/neutron-server {start|stop|restart|force-reload|status}"
exit 1 exit 1
;; ;;
esac esac