We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ae0d1de + 8491391 commit b9b7d5fCopy full SHA for b9b7d5f
advanced/Scripts/piholeDebug.sh
@@ -1215,6 +1215,11 @@ tricorder_use_nc_or_curl() {
1215
log_write " * Using ${COL_GREEN}curl${COL_NC} for transmission."
1216
# transmit he log via TLS and store the token returned in a variable
1217
tricorder_token=$(curl --silent --upload-file ${PIHOLE_DEBUG_LOG} https://tricorder.pi-hole.net:${TRICORDER_SSL_PORT_NUMBER})
1218
+ if [ -z "${tricorder_token}" ]; then
1219
+ # curl failed, fallback to nc
1220
+ log_write " * ${COL_GREEN}curl${COL_NC} failed, falling back to ${COL_YELLOW}netcat${COL_NC} for transmission."
1221
+ tricorder_token=$(< ${PIHOLE_DEBUG_LOG} nc tricorder.pi-hole.net ${TRICORDER_NC_PORT_NUMBER})
1222
+ fi
1223
# Otherwise,
1224
else
1225
# use net cat
0 commit comments