Add host-ready restore automation scripts
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#!/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"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {freshness|vaultwarden|gitea|paperless} [--what-if]" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user