Skip to content

Commit 4fd4e37

Browse files
committed
Fix for non-root
1 parent 40cb3eb commit 4fd4e37

File tree

2 files changed

+3
-3
lines changed
  • root/etc
    • logrotate.d
    • s6-overlay/s6-rc.d/init-mariadb-poststart

2 files changed

+3
-3
lines changed

root/etc/logrotate.d/mariadb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/config/log/mysql/*.log {
22
firstaction
3-
/usr/bin/mariadb-admin --local version >/dev/null 2>&1
3+
/usr/bin/mariadb-admin -uroot --local version >/dev/null 2>&1
44
endscript
55
su abc abc
66
missingok
@@ -18,6 +18,6 @@
1818
olddir archive/
1919
createolddir 770 abc abc
2020
postrotate
21-
/usr/bin/mariadb-admin --local flush-error-log flush-engine-log flush-general-log flush-slow-log
21+
/usr/bin/mariadb-admin -uroot --local flush-error-log flush-engine-log flush-general-log flush-slow-log
2222
endscript
2323
}

root/etc/s6-overlay/s6-rc.d/init-mariadb-poststart/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# shellcheck shell=bash
33

44
# check logrotate permissions
5-
if mariadb-admin --local version >/dev/null 2>&1; then
5+
if mariadb-admin -uroot --local version >/dev/null 2>&1; then
66
echo "Logrotate is enabled"
77
else
88
cat <<-EOFPASS

0 commit comments

Comments
 (0)