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

Merge pull request #7 from netweak/fix/wget-no-check-cert

Fix/wget no check cert
This commit is contained in:
Lucas Decrock 2025-01-16 10:56:02 +01:00 committed by GitHub
commit 1c6a3a2325
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 5 deletions

View file

@ -4,7 +4,7 @@
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Agent version # Agent version
version="1.2.0" version="1.2.1"
# API Token # API Token
if [ -f /etc/netweak/token.conf ] if [ -f /etc/netweak/token.conf ]
@ -224,9 +224,9 @@ data_post="token=${auth[0]}&data=$(base "$version") $(base "$uptime") $(base "$s
# 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/report" 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/report"
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/report" wget -q -o /dev/null -O /etc/netweak/log/agent.log -T 25 --post-data "$data_post" "https://api.netweak.com/agent/report"
wget_pid=$! wget_pid=$!
wget_counter=0 wget_counter=0
wget_timeout=30 wget_timeout=30

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