0
Fork 0
mirror of https://github.com/netweak/agent.git synced 2025-01-20 22:42:36 -05:00

Update heartbeat.sh

This commit is contained in:
Lucas Decrock 2025-01-16 10:53:22 +01:00 committed by GitHub
parent 2a582a23f3
commit d48c69efd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -18,9 +18,9 @@ data_post="token=${auth[0]}"
# API request with automatic termination # API request with automatic termination
if [ -n "$(command -v timeout)" ] if [ -n "$(command -v timeout)" ]
then then
timeout -s SIGKILL 30 wget -q -o /dev/null -O /etc/netweak/log/agent.log -T 25 --post-data "$data_post" --no-check-certificate "https://api.netweak.com/agent/heartbeat" timeout -s SIGKILL 30 wget -q -o /dev/null -O /etc/netweak/log/agent.log -T 25 --post-data "$data_post" "https://api.netweak.com/agent/heartbeat"
else else
wget -q -o /dev/null -O /etc/netweak/log/agent.log -T 25 --post-data "$data_post" --no-check-certificate "https://api.netweak.com/agent/heartbeat" wget -q -o /dev/null -O /etc/netweak/log/agent.log -T 25 --post-data "$data_post" "https://api.netweak.com/agent/heartbeat"
wget_pid=$! wget_pid=$!
wget_counter=0 wget_counter=0
wget_timeout=30 wget_timeout=30