From: Thomas Goirand Date: Mon, 3 Feb 2014 08:37:04 +0000 (+0800) Subject: Restart daemons after logrotate X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=d4dc27b456309309d530616df9ecb673d6d7ca0c;p=openstack-build%2Fneutron-build.git Restart daemons after logrotate Change-Id: Ia989bdde7ae136c1e49a349cd3694276207ff7a3 (cherry picked from commit bd3e2763cb1fa4aca94f89295820e313d5d2e3f1) --- diff --git a/debian/neutron-dhcp-agent.logrotate b/debian/neutron-dhcp-agent.logrotate index c7527e5e5..7519f8c7f 100644 --- a/debian/neutron-dhcp-agent.logrotate +++ b/debian/neutron-dhcp-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-dhcp-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-dhcp-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-l3-agent.logrotate b/debian/neutron-l3-agent.logrotate index 4420fbf89..f89414806 100644 --- a/debian/neutron-l3-agent.logrotate +++ b/debian/neutron-l3-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-l3-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-l3-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-lbaas-agent.logrotate b/debian/neutron-lbaas-agent.logrotate index 5efb4dcd9..548c5d3be 100644 --- a/debian/neutron-lbaas-agent.logrotate +++ b/debian/neutron-lbaas-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-lbaas-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-lbaas-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-metadata-agent.logrotate b/debian/neutron-metadata-agent.logrotate index 986234563..2d5c02631 100644 --- a/debian/neutron-metadata-agent.logrotate +++ b/debian/neutron-metadata-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-metadata-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-metadata-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-metering-agent.logrotate b/debian/neutron-metering-agent.logrotate index 4516cf8e1..a1db75adb 100644 --- a/debian/neutron-metering-agent.logrotate +++ b/debian/neutron-metering-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-metering-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-metering-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-plugin-linuxbridge-agent.logrotate b/debian/neutron-plugin-linuxbridge-agent.logrotate index 5ad23eabb..8535f498d 100644 --- a/debian/neutron-plugin-linuxbridge-agent.logrotate +++ b/debian/neutron-plugin-linuxbridge-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-plugin-linuxbridge-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-plugin-linuxbridge-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-plugin-openvswitch-agent.logrotate b/debian/neutron-plugin-openvswitch-agent.logrotate index 4d8471070..b3a4b57d4 100644 --- a/debian/neutron-plugin-openvswitch-agent.logrotate +++ b/debian/neutron-plugin-openvswitch-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-plugin-openvswitch-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-plugin-openvswitch-agent restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/neutron-server.logrotate b/debian/neutron-server.logrotate index 3b1817af8..0bac800ac 100644 --- a/debian/neutron-server.logrotate +++ b/debian/neutron-server.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-server restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-server restart >/dev/null 2>&1 || true + fi + endscript } \ No newline at end of file diff --git a/debian/neutron-vpn-agent.logrotate b/debian/neutron-vpn-agent.logrotate index ac7a112f7..89a4c9a3f 100644 --- a/debian/neutron-vpn-agent.logrotate +++ b/debian/neutron-vpn-agent.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service neutron-vpn-agent restart >/dev/null 2>&1 || true + else + invoke-rc.d neutron-vpn-agent restart >/dev/null 2>&1 || true + fi + endscript }