post_install() {
  systemd-sysusers mysql.conf
  systemd-tmpfiles --create mysql.conf

  echo " >> "
  echo " >> A temporary password is generated on first start and logged in journald."
  echo " >> Use 'journalctl -au mysqld | grep "\""temporary password"\""' to retrieve it."
  echo " >> "
}

post_upgrade() {
  systemd-sysusers mysql.conf

  if [ "$(vercmp $2 5.7)" -lt 0 ]; then
    echo " >> "
    echo " >> Major version update. Consider restart the service, running mysql_upgrade and restart it again after it."
    echo " >> "
  fi
}