Update 99-run.sh

This commit is contained in:
Alexandre
2021-11-17 23:19:07 +01:00
committed by GitHub
parent dbd3c48488
commit 97e95e277f

View File

@@ -13,8 +13,9 @@ mkdir -p "$(dirname "${CONFIGSOURCE}")"
mkdir -p "$(dirname "${DATABASESOURCE}")" mkdir -p "$(dirname "${DATABASESOURCE}")"
# Use existing config if present # Use existing config if present
if [ -f /data/config.yaml ]; then if [ -e /data/config.yaml ]; then
mv /data/config.yaml $(dirname "${CONFIGSOURCE}") [ ! -f $CONFIGSOURCE ] && mv /data/config.yaml $(dirname "${CONFIGSOURCE}") \
|| mv /data/config.yaml /data/config2.yaml
fi fi
# Check if config file is there, or create one from template # Check if config file is there, or create one from template
@@ -41,8 +42,9 @@ else
fi fi
# Use existing database if present # Use existing database if present
if [ -f /data/database.sqlite ]; then if [ -e /data/database.sqlite ]; then
mv /data/database.sqlite $(dirname "${DATABASESOURCE}") [ ! -f $DATABASESOURCE ] && mv /data/database.sqlite $(dirname "${DATABASESOURCE}") \
|| mv /data/database.sqlite /data/database2.sqlite
fi fi
# Check if database is here or create symlink # Check if database is here or create symlink