healthcheck-code.md aktualisiert
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
Diesen Code in das Backup-Script einfügen. Vorher einen healthcheck-Eintrag erstellen.
|
||||
|
||||
|
||||
#!/bin/bash
|
||||
```bash
|
||||
#``bin/bash
|
||||
HC_URL="http://100.x.y.z:8800/ping/<uuid>"
|
||||
|
||||
# Bei jedem Fehler (egal welcher Befehel schlägt fehl) → fail-Ping + Abbruch
|
||||
@ -11,3 +11,4 @@ trap 'curl -fsS --retry 3 "$HC_URL/fail" >/dev/null' ERR
|
||||
|
||||
# Ende erreicht ohne Fehler → Erfolg
|
||||
curl -fsS --retry 3 "$HC_URL" >/dev/null
|
||||
``
|
||||
|
||||
Reference in New Issue
Block a user