diff options
author | Simon Rettberg | 2021-03-02 11:08:49 +0100 |
---|---|---|
committer | Simon Rettberg | 2021-03-02 11:08:49 +0100 |
commit | 879a8f85d31a7caa4cba05c3bf1e3dcc99de663b (patch) | |
tree | 2585939410c4e52a5e1f9b5a877579a365f9d29d | |
parent | [xorg] Add xsession startup logging (diff) | |
download | mltk-879a8f85d31a7caa4cba05c3bf1e3dcc99de663b.tar.gz mltk-879a8f85d31a7caa4cba05c3bf1e3dcc99de663b.tar.xz mltk-879a8f85d31a7caa4cba05c3bf1e3dcc99de663b.zip |
[debug-report-bwlp] Switch to master server for error reports
.... with fallback to old URL in case https doesn't work
-rwxr-xr-x | core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report index 67f6b47a..4bad69a9 100755 --- a/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report +++ b/core/modules/debug-report-bwlp/data/opt/openslx/bin/debug_report @@ -13,17 +13,24 @@ TOOLS=" dmidecode " -URL="http://132.230.8.113/error_report.php" +URLS=" + https://bwlp-masterserver.ruf.uni-freiburg.de/error_report.php + http://132.230.8.113/error_report.php + end +" if [ "$UID" != "0" ]; then echo "Debug Reports können nur von root versendet werden" >&2 exit 1 fi -if ! curl -H "Expect:" -f -s -S --connect-timeout 5 "$URL" > /dev/null; then - echo "Kann den Debug-Report-Server in Freiburg nicht erreichen. :-(" >&2 - exit 1 -fi +for URL in $URLS; do + if [ "$URL" = "end" ]; then + echo "Kann den Debug-Report-Server in Freiburg nicht erreichen. :-(" >&2 + exit 1 + fi + curl -L -H "Expect:" -f -s -S --connect-timeout 5 "$URL" > /dev/null && break +done rm -rf /tmp/debug-report mkdir -p /tmp/debug-report/{static/proc,generated} @@ -134,10 +141,13 @@ fi echo "....fertig!" echo -n "Lade Fehlerbericht hoch...." -if ! curl -H "Expect:" -f -s -S -F "file=@error-report.tar.gz;filename=report" "$URL" > /dev/null; then - echo "Fehler beim Hochladen des Fehlerberichts :-(" >&2 - exit 1 -fi +for URL in $URLS; do + if [ "$URL" = "end" ]; then + echo "Fehler beim Hochladen des Fehlerberichts :-(" >&2 + exit 1 + fi + curl -L -H "Expect:" -f -s -S -F "file=@error-report.tar.gz;filename=report" "$URL" > /dev/null && break +done echo "Fehlerbericht erfolgreich versendet!" |