|
|
|
@ -399,15 +399,19 @@ Branches:
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tricorderFunc() {
|
|
|
|
|
local tricorder_token
|
|
|
|
|
if [[ ! -p "/dev/stdin" ]]; then
|
|
|
|
|
echo -e " ${INFO} Please do not call Tricorder directly"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
curl --upload-file "-" https://tricorder.pi-hole.net/upload < /dev/stdin
|
|
|
|
|
ret=$?
|
|
|
|
|
echo ""
|
|
|
|
|
exit $ret
|
|
|
|
|
tricorder_token="$(curl --silent --upload-file "-" https://tricorder.pi-hole.net/upload < /dev/stdin)"
|
|
|
|
|
if [ -z "${tricorder_token}" ]; then
|
|
|
|
|
echo -e "${CROSS} uploading failed failed, contact Pi-hole support for assistance."
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
echo "Upload successful, your token is: ${COL_BLUE}${tricorder_token}${COL_NC}"
|
|
|
|
|
exit 0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updateCheckFunc() {
|
|
|
|
|