summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packaging/RPMS/Fedora/rabbitmq-server.logrotate18
-rw-r--r--packaging/debs/Debian/debian/rabbitmq-server.logrotate18
-rwxr-xr-xscripts/rabbitmq-server4
3 files changed, 12 insertions, 28 deletions
diff --git a/packaging/RPMS/Fedora/rabbitmq-server.logrotate b/packaging/RPMS/Fedora/rabbitmq-server.logrotate
index 002adfdc..e366f36a 100644
--- a/packaging/RPMS/Fedora/rabbitmq-server.logrotate
+++ b/packaging/RPMS/Fedora/rabbitmq-server.logrotate
@@ -1,14 +1,4 @@
-/var/log/rabbitmq/*.log {
- size=2M
- missingok
- rotate 10
- compress
- delaycompress
- notifempty
- create 644 rabbitmq rabbitmq
-}
-
-/var/log/rabbitmq/*.log.back /var/log/rabbitmq/*.err {
+/var/log/rabbitmq/*.log /var/log/rabbitmq/*.err {
weekly
missingok
rotate 10
@@ -16,4 +6,8 @@
delaycompress
notifempty
create 644 rabbitmq rabbitmq
-}
+ sharedscripts
+ postrotate
+ /usr/sbin/rabbitmqctl reopen_logs
+ endscript
+} \ No newline at end of file
diff --git a/packaging/debs/Debian/debian/rabbitmq-server.logrotate b/packaging/debs/Debian/debian/rabbitmq-server.logrotate
index 002adfdc..e366f36a 100644
--- a/packaging/debs/Debian/debian/rabbitmq-server.logrotate
+++ b/packaging/debs/Debian/debian/rabbitmq-server.logrotate
@@ -1,14 +1,4 @@
-/var/log/rabbitmq/*.log {
- size=2M
- missingok
- rotate 10
- compress
- delaycompress
- notifempty
- create 644 rabbitmq rabbitmq
-}
-
-/var/log/rabbitmq/*.log.back /var/log/rabbitmq/*.err {
+/var/log/rabbitmq/*.log /var/log/rabbitmq/*.err {
weekly
missingok
rotate 10
@@ -16,4 +6,8 @@
delaycompress
notifempty
create 644 rabbitmq rabbitmq
-}
+ sharedscripts
+ postrotate
+ /usr/sbin/rabbitmqctl reopen_logs
+ endscript
+} \ No newline at end of file
diff --git a/scripts/rabbitmq-server b/scripts/rabbitmq-server
index a44dd6da..5368c04c 100755
--- a/scripts/rabbitmq-server
+++ b/scripts/rabbitmq-server
@@ -39,10 +39,6 @@ CLUSTER_CONFIG_FILE=/etc/default/rabbitmq_cluster.config
## Log rotation
LOGS="${LOG_BASE}/${NODENAME}.log"
SASL_LOGS="${LOG_BASE}/${NODENAME}-sasl.log"
-BACKUP_EXTENSION=".bak"
-
-[ -f "${LOGS}" ] && cat "${LOGS}" >> "${LOGS}${BACKUP_EXTENSION}"
-[ -f "${SASL_LOGS}" ] && cat "${SASL_LOGS}" >> "${SASL_LOGS}${BACKUP_EXTENSION}"
if [ -f "$CLUSTER_CONFIG_FILE" ]; then
CLUSTER_CONFIG="-rabbit cluster_config \"$CLUSTER_CONFIG_FILE\""