aboutsummaryrefslogtreecommitdiffstats
path: root/main/logrotate/logrotate.post-upgrade
diff options
context:
space:
mode:
Diffstat (limited to 'main/logrotate/logrotate.post-upgrade')
-rw-r--r--main/logrotate/logrotate.post-upgrade12
1 files changed, 12 insertions, 0 deletions
diff --git a/main/logrotate/logrotate.post-upgrade b/main/logrotate/logrotate.post-upgrade
new file mode 100644
index 00000000000..a3c4750d7e5
--- /dev/null
+++ b/main/logrotate/logrotate.post-upgrade
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+ver_old=$2
+
+if [ "$(apk version -t "$ver_old" '3.20.1-r1')" = '<' ]; then
+ # need to remove world permissions from status file, to dodge
+ # error: state file /var/lib/logrotate.status is world-readable
+ # 640 matches the spec file
+ chmod 640 /var/lib/logrotate.status
+fi
+
+exit 0