Sprunge pasting service seems to be broken. Changing to alternative ix.io

https://github.com/rupa/sprunge/issues/43
This commit is contained in:
Igor Pecovnik 2018-01-06 08:38:49 +01:00
parent 1c7cdec6f6
commit 72df4a091f

View File

@ -147,16 +147,16 @@ ParseOptions() {
;;
u)
# Upload /var/log/armhwinfo.log with additional support info
fping sprunge.us 2>/dev/null | grep -q alive || \
fping ix.io 2>/dev/null | grep -q alive || \
(echo -e "\nNetwork/firewall problem detected. Not able to upload debug info.\nPlease fix this or use \"-U\" instead and upload ${BOLD}whole output${NC} manually\n" >&2 ; exit 1)
which curl >/dev/null 2>&1 || apt-get -f -qq -y install curl
echo -e "System diagnosis information will now be uploaded to \c"
# we obfuscate IPv4 addresses somehow but not too much, MAC addresses have to remain
# in clear since otherwise the log becomes worthless due to randomly generated
# in clear since otherwise the log becomes worthless due to randomly generated
# addresses here and there that might conflict
CollectSupportInfo \
| sed -E 's/([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3}\.)([0-9]{1,3})/XXX.XXX.\3\4/g' \
| curl -F 'sprunge=<-' http://sprunge.us
| curl -F 'f:1=<-' ix.io
echo -e "Please post the URL in the forum where you've been asked for.\n"
exit 0
;;
@ -210,7 +210,7 @@ ParseOptions() {
exit 0
;;
D)
fping sprunge.us 2>/dev/null | grep -q alive || \
fping ix.io 2>/dev/null | grep -q alive || \
(echo "Network/firewall problem detected. Please fix this prior to installing RPi-Monitor." >&2 ; exit 1)
DebugOutput="$(mktemp /tmp/${0##*/}.XXXXXX)"
trap "rm \"${DebugOutput}\" ; exit 0" 0 1 2 3 15
@ -222,9 +222,9 @@ ParseOptions() {
echo -e "\nDebug output has been collected at the following URL: \c"
(cat "${DebugOutput}"; echo -e "\n\n\ngdisk.txt contents:\n" ; cat "${MyTempDir}/gdisk.txt" ;\
echo -e "\n\n\nsmartctl.txt contents:\n" ; cat "${MyTempDir}/smartctl.txt") \
| curl -F 'sprunge=<-' http://sprunge.us
| curl -F 'f:1=<-' ix.io
echo -e "Please post the URL in the Armbian forum where you've been asked for."
exit 0
exit 0
;;
c|C)
# check card mode
@ -830,7 +830,7 @@ CollectSupportInfo() {
stress -t 3 -c $(grep -c processor /proc/cpuinfo) --backoff 250 >/dev/null 2>&1 &
"$0" -s | grep "^[0-9]"
# Include name resolving information only if upload is not possible
fping sprunge.us 2>/dev/null | grep -q alive || \
fping ix.io 2>/dev/null | grep -q alive || \
[ -f /etc/resolv.conf ] && echo -e "\n### resolv.conf\n\n$(ls -la /etc/resolv.conf ; cat /etc/resolv.conf)" || \
echo -e "\n### resolv.conf does not exist or readable"
echo -e "\n### Current sysinfo:\n\n$(iostat -p ALL | grep -v "^loop")\n\n$(vmstat -w)\n\n$(free -h)\n\n$(uptime)\n\n$(dmesg | tail -n 250)"