fix the database connection

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-02-12 02:29:20 +01:00
parent 7756826eb3
commit e7dfb2514b
4 changed files with 29 additions and 6 deletions

View file

@ -18,11 +18,13 @@ if ! [ -w "$DUMP_DIR" ]; then
exit 1
fi
# # Delete the datadir once (needed for the migration from debian to alpine)
# if ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then
# rm -rf "${DATADIR:?}/"*
# touch "$DUMP_DIR/initial-cleanup-done"
# fi
# Delete the datadir once (needed for setting the correct credentials on old instances once)
if ! [ -f "$DUMP_DIR/export.failed" ] && ! [ -f "$DUMP_DIR/initial-cleanup-done" ]; then
set -ex
rm -rf "${DATADIR:?}/"*
touch "$DUMP_DIR/initial-cleanup-done"
set +ex
fi
# Test if some things match
# shellcheck disable=SC2235