Add a comment near space-unsafe code.
Factorise download sections.
Fix mariadb logrotate.

User (with enough privileges) must be supplied, otherwise logs are never
reopened.
Also, quote socket and binary paths.