@@ -20,6 +20,9 @@ CONFIG_FILE=$CURRENT_DIR/script-config.sh
2020# shellcheck source=script-config.sh
2121source " $CONFIG_FILE "
2222
23+ # set default variables for backward compatibility with older config files
24+ : ${HEALTHCHECKS_URL:= " https://hc-ping.com/" }
25+
2326# #######################################################################
2427
2528SYNC_MARKER=" SYNC -"
@@ -61,8 +64,8 @@ function main(){
6164 fi
6265 # invoke notification services if configured
6366 if [ " $HEALTHCHECKS " -eq 1 ]; then
64- echo " Healthchecks.io notification is enabled."
65- curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/ " $HEALTHCHECKS_ID " /start
67+ echo " Healthchecks.io notification is enabled. Notifications sent to $HEALTHCHECKS_URL . "
68+ curl -fsS -m 5 --retry 3 -o /dev/null " $HEALTHCHECKS_URL $HEALTHCHECKS_ID" /start
6669 fi
6770 if [ " $TELEGRAM " -eq 1 ]; then
6871 echo " Telegram notification is enabled."
@@ -805,7 +808,7 @@ SUMMARY: Equal [$EQ_COUNT] - Added [$ADD_COUNT] - Deleted [$DEL_COUNT] - Moved [
805808
806809function notify_success(){
807810 if [ " $HEALTHCHECKS " -eq 1 ]; then
808- curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/ " $HEALTHCHECKS_ID " /0 --data-raw " $NOTIFY_OUTPUT "
811+ curl -fsS -m 5 --retry 3 -o /dev/null " $HEALTHCHECKS_URL $HEALTHCHECKS_ID" /0 --data-raw " $NOTIFY_OUTPUT "
809812 fi
810813 if [ " $TELEGRAM " -eq 1 ]; then
811814 curl -fsS -m 5 --retry 3 -o /dev/null -X POST \
@@ -823,7 +826,7 @@ function notify_success(){
823826
824827function notify_warning(){
825828 if [ " $HEALTHCHECKS " -eq 1 ]; then
826- curl -fsS -m 5 --retry 3 -o /dev/null https://hc-ping.com/ " $HEALTHCHECKS_ID " /fail --data-raw " $NOTIFY_OUTPUT "
829+ curl -fsS -m 5 --retry 3 -o /dev/null " $HEALTHCHECKS_URL $HEALTHCHECKS_ID" /fail --data-raw " $NOTIFY_OUTPUT "
827830 fi
828831 if [ " $TELEGRAM " -eq 1 ]; then
829832 curl -fsS -m 5 --retry 3 -o /dev/null -X POST \
0 commit comments