post_install(){
  if hash systemd-sysusers &> /dev/null; then
    systemd-sysusers mariadb.conf
  fi

  if hash systemd-tmpfiles &> /dev/null; then
    systemd-tmpfiles --create mariadb.conf
  fi

  echo ":: You need to initialize the MariaDB data directory prior to starting"
  echo "   the service. This can be done with mysql_install_db command, e.g.:"
  echo "   mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql"

}

post_upgrade(){
  if hash systemd-sysusers &> /dev/null; then
    systemd-sysusers mariadb.conf
  fi

  if hash systemd-tmpfiles &> /dev/null; then
    systemd-tmpfiles --create mariadb.conf
  fi
}
