42 lines
1002 B
Bash
Executable File
42 lines
1002 B
Bash
Executable File
#!/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"
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {freshness|vaultwarden|gitea|paperless|immich} [--what-if]" >&2
|
|
exit 1
|
|
;;
|
|
esac
|