]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Added post-rotate scripts to restart daemon in logrotate
authorThomas Goirand <thomas@goirand.fr>
Mon, 3 Feb 2014 07:48:31 +0000 (15:48 +0800)
committerThomas Goirand <thomas@goirand.fr>
Mon, 3 Feb 2014 07:48:31 +0000 (15:48 +0800)
debian/cinder-api.logrotate
debian/cinder-backup.logrotate
debian/cinder-scheduler.logrotate
debian/cinder-volume.logrotate

index 9b966d77b720b35da343e2b234ba33aa52a1aee8..7ae16ebdbdae2bc6f7ca21951d836e00abd1c856 100644 (file)
@@ -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
 }
index fd6419de845e3efea80e755c2237570a173173d0..2e9043106c7aacec9fded00f86a2de1b9125aa19 100644 (file)
@@ -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
 }
index 15602c3b62b13c47f22fb27f77b2ae793ba9f08b..b1109e29b0ece70f7afbaf1b1e882488c5e768e6 100644 (file)
@@ -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
 }
index f3bb6b47337d910fe31132d396896ee0a30442b3..f75700d17c88b460c13ccdfe3228ed4d8e1cbda8 100644 (file)
@@ -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
 }