mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-09-10 18:34:18 +08:00
14 lines
458 B
Bash
Executable File
14 lines
458 B
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
. /usr/libexec/haproxy-manager/common.sh
|
|
|
|
ID="${1:-}"
|
|
is_valid_backup_id "$ID" || { echo "Invalid incident identifier" >&2; exit 1; }
|
|
BASE="$(incident_dir)"
|
|
[ ! -d "$BASE" ] || BASE="$(resolve_storage_dir "$BASE")" || exit 1
|
|
FILE="$BASE/$ID/diagnostics.log"
|
|
[ -f "$FILE" ] || { echo "Incident report not found: $ID" >&2; exit 1; }
|
|
|
|
# Keep the RPC response bounded even if a platform command produced excessive output.
|
|
tail -c 65536 "$FILE"
|