Commit 77976a14 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix mariadb logrotate.

User (with enough privileges) must be supplied, otherwise logs are never
reopened.
Also, quote socket and binary paths.
parent 7aa1d92c
......@@ -186,7 +186,7 @@ context =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum = 0e67f6d8b7de909be1324c680cabe8f0
md5sum = ed3ca668c8b3c4729bf3e1b986c14b5a
[template-zope]
< = download-base
......
......@@ -118,7 +118,7 @@ state-file = ${rootdirectory:srv}/logrotate.status
recipe = slapos.cookbook:logrotate.d
name = mariadb
log = ${mariadb-instance:error-log} ${mariadb-instance:slow-query-log}
post = ${mariadb-instance:mysql-binary} --no-defaults -B --socket=${mariadb-instance:socket} -e "FLUSH LOGS"
post = "${mariadb-instance:mysql-binary}" --no-defaults -B --socket="${mariadb-instance:socket}" -u root -e "FLUSH LOGS"
[cron]
recipe = slapos.cookbook:cron
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment