Browse Source

Rename to Neutron in sample init.d script

Related to LP Bug #1199794

Change-Id: I809a4d6c8e2ab047a1530f3fd6ef9aa60c0c638f
changes/32/36932/2
Dirk Mueller 9 years ago committed by Mark McClain
parent
commit
933498e861
  1. 32
      etc/init.d/neutron-server

32
etc/init.d/neutron-server

@ -1,51 +1,51 @@
#! /bin/sh
### BEGIN INIT INFO
# Provides: quantum-server
# Provides: neutron-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: quantum-server
# Description: Provides the Quantum networking service
# Short-Description: neutron-server
# Description: Provides the Neutron networking service
### END INIT INFO
set -e
PIDFILE=/var/run/quantum/quantum-server.pid
LOGFILE=/var/log/quantum/quantum-server.log
PIDFILE=/var/run/neutron/neutron-server.pid
LOGFILE=/var/log/neutron/neutron-server.log
DAEMON=/usr/bin/quantum-server
DAEMON=/usr/bin/neutron-server
DAEMON_ARGS="--log-file=$LOGFILE"
DAEMON_DIR=/var/run
ENABLED=true
if test -f /etc/default/quantum-server; then
. /etc/default/quantum-server
if test -f /etc/default/neutron-server; then
. /etc/default/neutron-server
fi
mkdir -p /var/run/quantum
mkdir -p /var/log/quantum
mkdir -p /var/run/neutron
mkdir -p /var/log/neutron
. /lib/lsb/init-functions
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
export TMPDIR=/var/lib/quantum/tmp
export TMPDIR=/var/lib/neutron/tmp
if [ ! -x ${DAEMON} ] ; then
exit 0
exit 0
fi
case "$1" in
start)
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
log_end_msg $?
;;
stop)
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}
log_end_msg $?
;;
@ -57,10 +57,10 @@ case "$1" in
;;
status)
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
;;
esac

Loading…
Cancel
Save