diff --git a/apache/hooks/log_rotate-relation-joined b/apache/hooks/log_rotate-relation-joined index 7481de07..56d9ef35 100755 --- a/apache/hooks/log_rotate-relation-joined +++ b/apache/hooks/log_rotate-relation-joined @@ -14,6 +14,9 @@ LOGS=/var/log/apache2 # return 1 # } +rotated_count=$(relation-get rotated-count 2>/dev/null) || true +rotated_count=${rotated_count:-52} + ## XXXvlab: a lot of this intelligence should be moved away into ``logrotate`` charm DST="$CONFIGSTORE/$TARGET_SERVICE_NAME/etc/logrotate.d/$SERVICE_NAME" file_put "$DST" <