DESC="OpenStack Neutron DHCP agent"
NAME=neutron-dhcp-agent
DAEMON=/usr/bin/neutron-dhcp-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini --log-file=/var/log/neutron/dhcp-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/dhcp-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-dhcp-agent -- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini --log-file=/var/log/neutron/dhcp-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/dhcp-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-dhcp-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/dhcp_agent.ini \
+ $DAEMON_ARGS
+end script
DESC="OpenStack Neutron L3 agent"
NAME=neutron-l3-agent
DAEMON=/usr/bin/neutron-l3-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini --log-file=/var/log/neutron/l3-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/l3-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-l3-agent -- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini --log-file=/var/log/neutron/l3-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/l3-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-l3-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/l3_agent.ini \
+ $DAEMON_ARGS
+end script
DESC="OpenStack Neutron LBaaS agent"
NAME=neutron-lbaas-agent
DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf --log-file=/var/log/neutron/lbaas-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/lbaas-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-lbaas-agent -- --config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf --log-file=/var/log/neutron/lbaas-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/lbaas-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-lbaas-agent -- \
+ --config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf \
+ $DAEMON_ARGS
+end script
DESC="OpenStack Neutron Metadata Agent"
NAME=neutron-metadata-agent
DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini --log-file=/var/log/neutron/metadata-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metadata-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metadata-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini \
- --log-file=/var/log/neutron/metadata-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metadata-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metadata-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini \
+ $DAEMON_ARGS
+end script
DESC="OpenStack Neutron Metering Agent"
NAME=neutron-metering-agent
DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini --log-file=/var/log/neutron/metering-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metering-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metering-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini \
- --log-file=/var/log/neutron/metering-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/metering-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-metering-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini \
+ $DAEMON_ARGS
+end script
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-linuxbridge-agent -- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini --log-file=/var/log/neutron/linuxbridge-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/linuxbridge-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-linuxbridge-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini \
+ $DAEMON_ARGS
+end script
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-nec-agent -- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/nec/nec.ini --log-file=/var/log/neutron/nec-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/nec-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-nec-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/nec/nec.ini \
+ $DAEMON_ARGS
+end script
DESC="Openstack Neutron OpenVSwitch Plugin Agent"
NAME=neutron-openvswitch-agent
DAEMON=/usr/bin/neutron-openvswitch-agent
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --log-file=/var/log/neutron/ovs-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
[ -x $DAEMON ] || exit 0
# Read configuration variable file if it is present
+[ -r /etc/default/openstack ] && . /etc/default/openstack
[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="${DAEMON_ARGS} --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="${DAEMON_ARGS} --log-file=/var/log/neutron/ovs-agent.log"
+
. /lib/lsb/init-functions
[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
neutron_core_plugin_to_plugin_name ${CURRENT_PLUGIN}
neutron_plugin_ini_path ${NEUTRON_PLUGIN_NAME}
[ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG"
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/ovs-agent.log"
exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-openvswitch-agent -- \
--config-file=/etc/neutron/neutron.conf \
- --log-file=/var/log/neutron/ovs-agent.log $CONF_ARG
+ $CONF_ARG $DAEMON_ARGS
end script
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-ryu-agent -- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ryu/ryu.ini --log-file=/var/log/neutron/ryu-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/ryu-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-ryu-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/ryu/ryu.ini \
+ $DAEMON_ARGS
+end script
SCRIPTNAME=/etc/init.d/${NAME}
LOGFILE=/var/log/neutron/neutron-server.log
DAEMON_DIR=/var/run
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --log-file=$LOGFILE"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
# Exit if the package is not installed
[ -x $DAEMON ] || exit 0
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=$LOGFILE"
+
[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
. /usr/share/neutron-common/plugin_guess_func
[ -r /usr/share/neutron-common/plugin_guess_func ] || exit 0
. /usr/share/neutron-common/plugin_guess_func
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/server.log"
+
if ! [ -r /etc/neutron/neutron.conf ] ; then
echo "Cloud not read /etc/neutron/neutron.conf: exiting"
exit 0
[ -r "$NEUTRON_PLUGIN_CONFIG" ] && CONF_ARG="--config-file $NEUTRON_PLUGIN_CONFIG"
exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-server -- \
--config-file /etc/neutron/neutron.conf \
- --log-file /var/log/neutron/server.log $CONF_ARG
+ $DAEMON_ARGS $CONF_ARG
end script
DESC="OpenStack Neutron VPN Agent"
NAME=neutron-vpn-agent
DAEMON=/usr/bin/${NAME}
-DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini --log-file=/var/log/neutron/vpn-agent.log"
+DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
. /lib/lsb/init-functions
+[ -r /etc/default/openstack ] && . /etc/default/openstack
+[ -r /etc/default/$NAME ] && . /etc/default/$NAME
+
+[ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+[ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/vpn-agent.log"
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
chown neutron:root /var/run/neutron
end script
-exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-vpn-agent -- \
- --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini \
- --log-file=/var/log/neutron/vpn-agent.log
+script
+ [ -r /etc/default/openstack ] && . /etc/default/openstack
+ [ -r /etc/default/$UPSTART_JOB ] && . /etc/default/$UPSTART_JOB
+
+ [ "x$USE_SYSLOG" = "xyes" ] && DAEMON_ARGS="$DAEMON_ARGS --use-syslog"
+ [ "x$USE_LOGFILE" != "xno" ] && DAEMON_ARGS="$DAEMON_ARGS --log-file=/var/log/neutron/vpn-agent.log"
+
+ exec start-stop-daemon --start --chuid neutron:neutron --exec /usr/bin/neutron-vpn-agent -- \
+ --config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini \
+ $DAEMON_ARGS
+end script