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"
|
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
|
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
|
"$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job ok: $MODE" "Restore job succeeded. Report: $REPORT_FILE" default || true
|
||||||
|
echo "Done"
|
||||||
else
|
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
|
"$SCRIPT_DIR/send-ntfy.sh" "$TOPIC" "Restore job failed: $MODE" "Restore job failed. Report: $REPORT_FILE" high || true
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ fi
|
|||||||
NTFY_URL="${NTFY_URL:-https://ntfy.kaleschke.info}"
|
NTFY_URL="${NTFY_URL:-https://ntfy.kaleschke.info}"
|
||||||
|
|
||||||
curl -fsS \
|
curl -fsS \
|
||||||
|
--connect-timeout 5 \
|
||||||
|
--max-time 10 \
|
||||||
-H "Title: $TITLE" \
|
-H "Title: $TITLE" \
|
||||||
-H "Priority: $PRIORITY" \
|
-H "Priority: $PRIORITY" \
|
||||||
-d "$MESSAGE" \
|
-d "$MESSAGE" \
|
||||||
|
|||||||
Reference in New Issue
Block a user