Improve restore job ntfy timeout and output
This commit is contained in:
@@ -15,9 +15,15 @@ REPORT_FILE="$REPORT_ROOT/${MODE}-$(date +%F).md"
|
||||
|
||||
mkdir -p "$REPORT_ROOT"
|
||||
|
||||
echo "Running restore job: $MODE"
|
||||
echo "Report target: $REPORT_FILE"
|
||||
|
||||
if "$SCRIPT_DIR/run-restore-checks.sh" "$MODE" > "$REPORT_FILE"; then
|
||||
echo "Restore job succeeded, sending ntfy..."
|
||||
"$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job ok: $MODE" "Restore job succeeded. Report: $REPORT_FILE" default || true
|
||||
echo "Done"
|
||||
else
|
||||
echo "Restore job failed, sending ntfy..."
|
||||
"$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job failed: $MODE" "Restore job failed. Report: $REPORT_FILE" high || true
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -14,6 +14,8 @@ fi
|
||||
NTFY_URL="${NTFY_URL:-https://ntfy.kaleschke.info}"
|
||||
|
||||
curl -fsS \
|
||||
--connect-timeout 5 \
|
||||
--max-time 10 \
|
||||
-H "Title: $TITLE" \
|
||||
-H "Priority: $PRIORITY" \
|
||||
-d "$MESSAGE" \
|
||||
|
||||
Reference in New Issue
Block a user