diff --git a/elements/neutron-ovs-cleanup/install.d/neutron-source-install/81-neutron-ovs-cleanup b/elements/neutron-ovs-cleanup/install.d/neutron-source-install/81-neutron-ovs-cleanup index 6c00e6c99..57d921dfe 100755 --- a/elements/neutron-ovs-cleanup/install.d/neutron-source-install/81-neutron-ovs-cleanup +++ b/elements/neutron-ovs-cleanup/install.d/neutron-source-install/81-neutron-ovs-cleanup @@ -9,4 +9,6 @@ ln -sf $NEUTRON_VENV_DIR/bin/neutron-ovs-cleanup /usr/local/bin/neutron-ovs-clea DIB_INIT_SYSTEM=$(dib-init-system) if [ "$DIB_INIT_SYSTEM" == "systemd" ]; then install -D -g root -o root -m 0755 ${SCRIPTDIR}/neutron-ovs-cleanup.service /usr/lib/systemd/system/neutron-ovs-cleanup.service +elif [ "$DIB_INIT_SYSTEM" == "upstart" ]; then + install -D -g root -o root -m 0755 ${SCRIPTDIR}/neutron-ovs-cleanup.conf /etc/init/neutron-ovs-cleanup.conf fi diff --git a/elements/neutron-ovs-cleanup/install.d/neutron-source-install/neutron-ovs-cleanup.conf b/elements/neutron-ovs-cleanup/install.d/neutron-source-install/neutron-ovs-cleanup.conf new file mode 100644 index 000000000..dc0e460bb --- /dev/null +++ b/elements/neutron-ovs-cleanup/install.d/neutron-source-install/neutron-ovs-cleanup.conf @@ -0,0 +1,12 @@ +# neutron-ovs-cleanup +# + +start on started openvswitch-switch +stop on runlevel [!2345] + +pre-start script + [ ! -e /etc/neutron/neutron.conf ] && exit 0 + + start-stop-daemon --start --chuid neutron --exec /usr/local/bin/neutron-ovs-cleanup -- \ + --config-dir /etc/neutron +end script