Skip to content

Commit

Permalink
Update healthcheck.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
kx1t authored Sep 29, 2023
1 parent 23aa72b commit e4e6093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rootfs/healthcheck/healthcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ CHECK_INTERVAL=60
PACKETCOUNT="$(grep captured <<< "$(timeout --preserve-status $CHECK_INTERVAL tcpdump -p -i lo udp port 34995 2>/dev/stdout 1>/dev/null)"| awk '{print $1}')"
if [[ -z "$PACKETCOUNT" ]] || [[ "$PACKETCOUNT" -lt 1 ]]
then
echo "No data received from SDR for $CHECK_INTERVAL or more seconds. UNHEALTHY"
echo "$(date): No data received from SDR for $CHECK_INTERVAL or more seconds. UNHEALTHY"
EXITCODE=1
else
echo "$PACKETCOUNT packets received from SDR during the last $CHECK_INTERVAL seconds. HEALTHY"
echo "$(date): $PACKETCOUNT packets received from SDR during the last $CHECK_INTERVAL seconds. HEALTHY"
EXITCODE=0
fi

Expand Down

0 comments on commit e4e6093

Please sign in to comment.