From: Thomas Goirand Date: Mon, 3 Feb 2014 07:48:31 +0000 (+0800) Subject: Added post-rotate scripts to restart daemon in logrotate X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=00e4863aa4ad791ddbfc21949cf9e1342bfd2369;p=openstack-build%2Fcinder-build.git Added post-rotate scripts to restart daemon in logrotate --- diff --git a/debian/cinder-api.logrotate b/debian/cinder-api.logrotate index 9b966d77b..7ae16ebdb 100644 --- a/debian/cinder-api.logrotate +++ b/debian/cinder-api.logrotate @@ -1,7 +1,14 @@ /var/log/cinder/cinder-api.log { - daily - missingok - compress - delaycompress - notifempty + daily + missingok + compress + delaycompress + notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service cinder-api restart >/dev/null 2>&1 || true + else + invoke-rc.d cinder-api restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/cinder-backup.logrotate b/debian/cinder-backup.logrotate index fd6419de8..2e9043106 100644 --- a/debian/cinder-backup.logrotate +++ b/debian/cinder-backup.logrotate @@ -4,4 +4,11 @@ compress delaycompress notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service cinder-backup restart >/dev/null 2>&1 || true + else + invoke-rc.d cinder-backup restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/cinder-scheduler.logrotate b/debian/cinder-scheduler.logrotate index 15602c3b6..b1109e29b 100644 --- a/debian/cinder-scheduler.logrotate +++ b/debian/cinder-scheduler.logrotate @@ -1,7 +1,14 @@ /var/log/cinder/cinder-scheduler.log { - daily - missingok - compress - delaycompress - notifempty + daily + missingok + compress + delaycompress + notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service cinder-scheduler restart >/dev/null 2>&1 || true + else + invoke-rc.d cinder-scheduler restart >/dev/null 2>&1 || true + fi + endscript } diff --git a/debian/cinder-volume.logrotate b/debian/cinder-volume.logrotate index f3bb6b473..f75700d17 100644 --- a/debian/cinder-volume.logrotate +++ b/debian/cinder-volume.logrotate @@ -1,7 +1,14 @@ /var/log/cinder/cinder-volume.log { - daily - missingok - compress - delaycompress - notifempty + daily + missingok + compress + delaycompress + notifempty + postrotate + if dpkg-vendor --derives-from ubuntu ; then + service cinder-volume restart >/dev/null 2>&1 || true + else + invoke-rc.d cinder-volume restart >/dev/null 2>&1 || true + fi + endscript }