mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Merge pull request #1464 from pi-hole/new/tricorder_option
Tricorder debug logs are now uploaded using SSL when `openssl` is available
This commit is contained in:
commit
703ff09a91
1 changed files with 13 additions and 3 deletions
10
pihole
10
pihole
|
@ -268,6 +268,14 @@ piholeCheckoutFunc() {
|
|||
checkout "$@"
|
||||
}
|
||||
|
||||
tricorderFunc() {
|
||||
if command -v openssl &> /dev/null; then
|
||||
openssl s_client -quiet -connect tricorder.pi-hole.net:9998 2> /dev/null < /dev/stdin
|
||||
else
|
||||
nc tricorder.pi-hole.net 9999 < /dev/stdin
|
||||
fi
|
||||
}
|
||||
|
||||
helpFunc() {
|
||||
cat << EOM
|
||||
::: Control all Pi-hole specific functions
|
||||
|
@ -302,6 +310,7 @@ helpFunc() {
|
|||
::: 'pihole disable 5m' - will disable blocking for 5 minutes
|
||||
::: restartdns Restart dnsmasq
|
||||
::: checkout Check out different branches
|
||||
::: tricorder Upload log to Pi-hole's medical tricorder (uses SSL when possible)
|
||||
EOM
|
||||
exit 0
|
||||
}
|
||||
|
@ -333,5 +342,6 @@ case "${1}" in
|
|||
"-a" | "admin" ) webpageFunc "$@";;
|
||||
"-t" | "tail" ) tailFunc;;
|
||||
"checkout" ) piholeCheckoutFunc "$@";;
|
||||
"tricorder" ) tricorderFunc;;
|
||||
* ) helpFunc;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue