From 56b905deba95496050f82cb11a8db83f2c58847e Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Mon, 3 Feb 2014 15:48:31 +0800 Subject: [PATCH] Added post-rotate scripts to restart daemon in logrotate Rewritten-From: 00e4863aa4ad791ddbfc21949cf9e1342bfd2369 --- xenial/debian/cinder-api.logrotate | 17 ++++++++++++----- xenial/debian/cinder-backup.logrotate | 7 +++++++ xenial/debian/cinder-scheduler.logrotate | 17 ++++++++++++----- xenial/debian/cinder-volume.logrotate | 17 ++++++++++++----- 4 files changed, 43 insertions(+), 15 deletions(-) diff --git a/xenial/debian/cinder-api.logrotate b/xenial/debian/cinder-api.logrotate index 9b966d77b..7ae16ebdb 100644 --- a/xenial/debian/cinder-api.logrotate +++ b/xenial/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/xenial/debian/cinder-backup.logrotate b/xenial/debian/cinder-backup.logrotate index fd6419de8..2e9043106 100644 --- a/xenial/debian/cinder-backup.logrotate +++ b/xenial/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/xenial/debian/cinder-scheduler.logrotate b/xenial/debian/cinder-scheduler.logrotate index 15602c3b6..b1109e29b 100644 --- a/xenial/debian/cinder-scheduler.logrotate +++ b/xenial/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/xenial/debian/cinder-volume.logrotate b/xenial/debian/cinder-volume.logrotate index f3bb6b473..f75700d17 100644 --- a/xenial/debian/cinder-volume.logrotate +++ b/xenial/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 } -- 2.45.2