mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Fix piping to pihole tricorder
Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
parent
b97f76e678
commit
31c7c019cb
1 changed files with 4 additions and 23 deletions
25
pihole
25
pihole
|
@ -404,29 +404,10 @@ tricorderFunc() {
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! (echo > /dev/tcp/tricorder.pi-hole.net/9998) >/dev/null 2>&1; then
|
curl --upload-file "-" https://tricorder.pi-hole.net/upload < /dev/stdin
|
||||||
echo -e " ${CROSS} Unable to connect to Pi-hole's Tricorder server"
|
ret=$?
|
||||||
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 -e " ${INFO} ${COL_YELLOW}Security Notice${COL_NC}: ${COL_WHITE}openssl${COL_NC} is not installed
|
|
||||||
Your debug log will be transmitted unencrypted via plain-text
|
|
||||||
There is a possibility that this could be intercepted by a third party
|
|
||||||
If you wish to cancel, press Ctrl-C to exit within 10 seconds"
|
|
||||||
secs="10"
|
|
||||||
while [[ "$secs" -gt "0" ]]; do
|
|
||||||
echo -ne "."
|
|
||||||
sleep 1
|
|
||||||
: $((secs--))
|
|
||||||
done
|
|
||||||
echo ""
|
echo ""
|
||||||
nc tricorder.pi-hole.net 9999 < /dev/stdin
|
exit $ret
|
||||||
exit "$?"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCheckFunc() {
|
updateCheckFunc() {
|
||||||
|
|
Loading…
Reference in a new issue