From 078d12a5ad5321ae1b78d4ffb411d60195770e7f Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 13 Aug 2023 11:35:00 +0200 Subject: [PATCH] Create mariadb database --- webtrees/rootfs/etc/cont-init.d/99-run.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webtrees/rootfs/etc/cont-init.d/99-run.sh b/webtrees/rootfs/etc/cont-init.d/99-run.sh index 1a4960671..efffd0127 100755 --- a/webtrees/rootfs/etc/cont-init.d/99-run.sh +++ b/webtrees/rootfs/etc/cont-init.d/99-run.sh @@ -43,6 +43,9 @@ case $(bashio::config 'DB_TYPE') in bashio::log.warning "Webtrees is using the Maria DB addon" bashio::log.warning "Please ensure this is included in your backups" bashio::log.warning "Uninstalling the MariaDB addon will remove any data" + + # Create database + mysql --host="$(bashio::services 'mysql' 'host')" --port="$(bashio::services 'mysql' 'port')" --user="$(bashio::services "mysql" "username")" --password="$(bashio::services "mysql" "password")" -e"CREATE DATABASE IF NOT EXISTS webtrees;" ;; external)