#!/bin/bash set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" MODE="${1:-}" WHATIF="${2:-}" case "$MODE" in freshness) exec "$SCRIPT_DIR/check-restore-freshness.sh" ;; vaultwarden) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/vaultwarden-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/vaultwarden-restore-test.sh" ;; gitea) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/gitea-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/gitea-restore-test.sh" ;; paperless) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/paperless-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/paperless-restore-test.sh" ;; immich) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/immich-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/immich-restore-test.sh" ;; authelia) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/authelia-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/authelia-restore-test.sh" ;; adguard) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/adguard-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/adguard-restore-test.sh" ;; nextcloud) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/nextcloud-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/nextcloud-restore-test.sh" ;; komodo-bootstrap) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/komodo-bootstrap-test.sh" --what-if fi exec "$SCRIPT_DIR/komodo-bootstrap-test.sh" ;; komodo-mongo-restore) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/komodo-mongo-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/komodo-mongo-restore-test.sh" ;; traefik) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/traefik-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/traefik-restore-test.sh" ;; mailarchiver) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/mailarchiver-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/mailarchiver-restore-test.sh" ;; mealie) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/mealie-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/mealie-restore-test.sh" ;; shared-pg-cluster) if [ "$WHATIF" = "--what-if" ]; then exec "$SCRIPT_DIR/shared-pg-cluster-restore-test.sh" --what-if fi exec "$SCRIPT_DIR/shared-pg-cluster-restore-test.sh" ;; *) echo "Usage: $0 {freshness|vaultwarden|gitea|paperless|immich|authelia|adguard|nextcloud|komodo-bootstrap|komodo-mongo-restore|traefik|mailarchiver|mealie|shared-pg-cluster} [--what-if]" >&2 exit 1 ;; esac