From fe3229a279f66be9141127c4028a0ad5c0cdbbba Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Fri, 22 Oct 2021 07:50:32 +0200 Subject: [PATCH] Update start.sh --- webtrees/rootfs/start.sh | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/webtrees/rootfs/start.sh b/webtrees/rootfs/start.sh index b36ce1328..7b08e73d4 100644 --- a/webtrees/rootfs/start.sh +++ b/webtrees/rootfs/start.sh @@ -43,15 +43,8 @@ fi # PERSISTENCE # ############### -#if [ -f /data/config.ini.php ]; then -#ln -s /data/config.ini.php /var/www/webtrees/data -#fi - -bashio:log.info "" - -if [ -f /data/webtrees.sqlite ]; then -bashio:log.info "Using existing database" -ln -s /data/webtrees.sqlite /var/www/webtrees/data -else -bashio:log.warning "No existing database found with the name selected, creating a new one" +DB_NAME=$(bashio::config 'DB_NAME') +if [ -f "/data/$DB_NAME.sqlite" ]; then +bashio:log.info "Using existing database $DB_NAME.sqlite" +ln -s "/data/$DB_NAME.sqlite" /var/www/webtrees/data fi