#!/bin/bash 

#source /opt/scripts_local/shared_functions.sh

HC_ID=$1
MON_APP="Vh client"

/usr/bin/vhcli -t LIST | grep ConBee 

if [ $? -eq 0 ]; then
  echo "$MON_APP Sucessfully responding."
  echo "Pinging https://uptime.noxs.me."
  # curl -m 10 --retry 5 https://hc.noxs.me/ping/$HC_ID
  curl -m 10 --retry 5 https://uptime.noxs.me/api/push/$HC_ID?status=up&msg=OK&ping=
  exit 0
else
  echo "$MON_APP is not responding."
  exit 1
fi



