|
8 | 8 | ###################### |
9 | 9 | # CONFIG VARIABLES # |
10 | 10 | ###################### |
11 | | -SNAPSCRIPTVERSION="2.9.DEV6" |
| 11 | +SNAPSCRIPTVERSION="2.9.DEV7" |
12 | 12 |
|
13 | 13 | # Read SnapRAID version |
14 | 14 | SNAPRAIDVERSION="$(snapraid -V | sed -e 's/snapraid v\(.*\)by.*/\1/')" |
@@ -60,7 +60,7 @@ function main(){ |
60 | 60 | apt-get install -qq -o=Dpkg::Use-Pty=0 curl; |
61 | 61 | fi |
62 | 62 | echo "Healthchecks.io integration is enabled." |
63 | | - curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID/start" |
| 63 | + curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID"/start |
64 | 64 | fi |
65 | 65 |
|
66 | 66 | # Check if script configuration file has been found |
@@ -648,22 +648,26 @@ function prepare_mail() { |
648 | 648 | elif [ -z "${JOBS_DONE##*"SCRUB"*}" ] && ! grep -qw "$SCRUB_MARKER" "$TMP_OUTPUT"; then |
649 | 649 | # Scrub ran but did not complete successfully so lets warn the user |
650 | 650 | SUBJECT="[WARNING] SCRUB job ran but did not complete successfully $EMAIL_SUBJECT_PREFIX" |
| 651 | + HC_OUTPUT="$SUBJECT |
| 652 | +SUMMARY: Equal [$EQ_COUNT] - Added [$ADD_COUNT] - Deleted [$DEL_COUNT] - Moved [$MOVE_COUNT] - Copied [$COPY_COUNT] - Updated [$UPDATE_COUNT]" |
651 | 653 | healthchecks_warning |
652 | 654 | else |
653 | 655 | SUBJECT="[COMPLETED] $JOBS_DONE Jobs $EMAIL_SUBJECT_PREFIX" |
| 656 | + HC_OUTPUT="$SUBJECT |
| 657 | +SUMMARY: Equal [$EQ_COUNT] - Added [$ADD_COUNT] - Deleted [$DEL_COUNT] - Moved [$MOVE_COUNT] - Copied [$COPY_COUNT] - Updated [$UPDATE_COUNT]" |
654 | 658 | healthchecks_success |
655 | 659 | fi |
656 | 660 | } |
657 | 661 |
|
658 | 662 | function healthchecks_success(){ |
659 | 663 | if [ "$HEALTHCHECKS" -eq 1 ]; then |
660 | | - curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID"/0 --data-raw "$SUBJECT" |
| 664 | + curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID"/0 --data-raw "$HC_OUTPUT" |
661 | 665 | fi |
662 | 666 | } |
663 | 667 |
|
664 | 668 | function healthchecks_warning(){ |
665 | 669 | if [ "$HEALTHCHECKS" -eq 1 ]; then |
666 | | - curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID"/fail --data-raw "$SUBJECT" |
| 670 | + curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/"$HEALTHCHECKS_ID"/fail --data-raw "HC_OUTPUT" |
667 | 671 | fi |
668 | 672 | } |
669 | 673 |
|
|
0 commit comments