From b90ef44f2740148f5d9b812d5305ae31ad5620d3 Mon Sep 17 00:00:00 2001 From: AIIrondev Date: Wed, 15 Jul 2026 21:54:10 +0200 Subject: [PATCH] changes to the startup --- Website/launch.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Website/launch.sh b/Website/launch.sh index a9a7e4e..3b5480b 100755 --- a/Website/launch.sh +++ b/Website/launch.sh @@ -6,6 +6,15 @@ cd "$SCRIPT_DIR" DOCKER_CMD=() SECRETS_FILE="$SCRIPT_DIR/.mongo-secrets.env" +RESET_MONGO_DATA=0 + +for arg in "$@"; do + case "$arg" in + --reset-mongo-data|-r) + RESET_MONGO_DATA=1 + ;; + esac +done ensure_mongo_secrets() { if [ -f "$SECRETS_FILE" ]; then @@ -145,7 +154,7 @@ is_truthy() { } reset_mongo_data_if_requested() { - if ! is_truthy "${MONGO_RESET_DATA:-0}"; then + if ! is_truthy "${MONGO_RESET_DATA:-0}" && [ "$RESET_MONGO_DATA" -ne 1 ]; then return 0 fi