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"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - DHCP Service
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-dhcp-agent systemd-start
+ExecStop=/etc/init.d/neutron-dhcp-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-dhcp-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
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"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - L3 Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-l3-agent systemd-start
+ExecStop=/etc/init.d/neutron-l3-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-l3-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-lbaas-agent
DAEMON=/usr/bin/${NAME}
DAEMON_ARGS="--config-file=/etc/neutron/lbaas_agent.ini --config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - LBAAS Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-lbaas-agent systemd-start
+ExecStop=/etc/init.d/neutron-lbaas-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-lbaas-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-metadata-agent
DAEMON=/usr/bin/${NAME}
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metadata_agent.ini"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ do_stop
+ case "$?" in
+ 0|1)
+ do_start
+ case "$?" in
+ 0) log_end_msg 0 ;;
+ 1) log_end_msg 1 ;; # Old process is still running
+ *) log_end_msg 1 ;; # Failed to start
+ esac
+ ;;
+ *)
+ # Failed to stop
+ log_end_msg 1
+ ;;
+ esac
+ ;;
+
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
+ exit 3
+ ;;
+esac
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - Metadata Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service neutron-l3-agent.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-metadata-agent systemd-start
+ExecStop=/etc/init.d/neutron-metadata-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-metadata-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-metering-agent
DAEMON=/usr/bin/${NAME}
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/metering_agent.ini"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - Metering Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-metering-agent systemd-start
+ExecStop=/etc/init.d/neutron-metering-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-metering-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-linuxbridge-agent
DAEMON=/usr/bin/neutron-linuxbridge-agent
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini --log-file=/var/log/neutron/linuxbridge-agent.log"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CONF_FILE="/etc/neutron/plugins/linuxbridge/linuxbridge_conf.ini"
. /lib/lsb/init-functions
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --background --quiet --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - LinuxBridge Plugin Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-linuxbridge-agent systemd-start
+ExecStop=/etc/init.d/neutron-linuxbridge-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-linuxbridge-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-openvswitch-agent
DAEMON=/usr/bin/neutron-openvswitch-agent
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
CONF_FILE=/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
DESC="${DESC} with ${NEUTRON_PLUGIN_NAME} plugin"
fi
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
if [ -x /usr/bin/neutron-ovs-cleanup ] ; then
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - OpenVSwithc Plugin Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-openvswitch-agent systemd-start
+ExecStop=/etc/init.d/neutron-openvswitch-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-openvswitch-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+
NAME=neutron-vpn-agent
DAEMON=/usr/bin/${NAME}
DAEMON_ARGS="--config-file=/etc/neutron/neutron.conf --config-file=/etc/neutron/vpn_agent.ini"
-PIDFILE=/var/run/$NAME.pid
+PIDFILE=/var/run/neutron/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ "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"
+mkdir -p /var/run/neutron
+chown neutron:neutron /var/run/neutron
+
do_start()
{
start-stop-daemon --start --quiet --background --chuid neutron:neutron --make-pidfile --pidfile $PIDFILE --startas $DAEMON --test > /dev/null \
status)
status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
;;
+ systemd-start)
+ do_start
+ ;;
+ systemd-stop)
+ do_stop
+ ;;
restart|force-reload)
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
--- /dev/null
+[Unit]
+Description=OpenStack Networking service - VPN Agent
+Documentation=http://docs.openstack.org/
+After=network.service mysql.service postgresql.service rabbitmq-server.service keystone.service openvswitch-switch.service
+
+[Service]
+User=neutron
+Group=neutron
+ExecStart=/etc/init.d/neutron-vpn-agent systemd-start
+ExecStop=/etc/init.d/neutron-vpn-agent systemd-stop
+PIDFile=/var/run/neutron/neutron-vpn-agent.pid
+Restart=on-failure
+Type=forking
+
+[Install]
+WantedBy=multi-user.target
+