16 lines
457 B
Bash
Executable File
16 lines
457 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
TOPIC="${TOPIC:-homelab-info}"
|
|
TESTS="${TESTS:-vaultwarden gitea paperless}"
|
|
|
|
pick_random() {
|
|
printf '%s\n' $TESTS | awk 'BEGIN { srand() } { items[++count] = $0 } END { print items[int(rand() * count) + 1] }'
|
|
}
|
|
|
|
selected="$(pick_random)"
|
|
echo "Selected monthly restore test: $selected"
|
|
|
|
exec "$SCRIPT_DIR/run-restore-job-with-ntfy.sh" "$selected" "$TOPIC"
|