mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Confirm Tricorder is online
* Scan port 9998 to confirm the availability of "tricorder.pi-hole.net" * Exit codes for upload process
This commit is contained in:
parent
075f00cecd
commit
1f3db8b602
1 changed files with 7 additions and 0 deletions
7
pihole
7
pihole
|
@ -306,8 +306,14 @@ tricorderFunc() {
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if ! timeout 2 nc -z tricorder.pi-hole.net 9998 &> /dev/null; then
|
||||
echo "Unable to connect to Pi-hole's Tricorder server."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if command -v openssl &> /dev/null; then
|
||||
openssl s_client -quiet -connect tricorder.pi-hole.net:9998 2> /dev/null < /dev/stdin
|
||||
exit "$?"
|
||||
else
|
||||
echo "Your debug log will be transmitted unencrypted via plain-text"
|
||||
echo "There is a possibility that this could be intercepted by a third party"
|
||||
|
@ -320,6 +326,7 @@ tricorderFunc() {
|
|||
done
|
||||
echo " "
|
||||
nc tricorder.pi-hole.net 9999 < /dev/stdin
|
||||
exit "$?"
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue