diff --git a/mount_folder.sh b/mount_folder.sh index 24512e2..396e0a7 100755 --- a/mount_folder.sh +++ b/mount_folder.sh @@ -4,7 +4,19 @@ # Load Configuration from json ############################################################################### -CONFIG_FILE="folder_mount_config.json" +# Require the config‑file path as the first argument: +CONFIG_FILE="$1" + +if [[ -z "$CONFIG_FILE" ]]; then + echo "[ERROR] No path to config file given" + exit 1 +fi + +# Ensure the file actually exists: +if [[ ! -f "$CONFIG_FILE" ]]; then + echo "[ERROR] Config file '$CONFIG_FILE' not found." + exit 1 +fi # Ensure jq is installed before proceeding. if ! command -v jq >/dev/null 2>&1; then