Files
archy/apps/qortal/health.sh

9 lines
429 B
Bash

#!/bin/sh
# Healthy when the API answers. While Core is still downloading or importing
# its bootstrap (tens of minutes on a fresh install) the API is not up yet;
# report healthy then too, or the health monitor restarts the container and
# throws the partial download away.
curl -fsS -m 5 -o /dev/null http://127.0.0.1:12391/admin/info && exit 0
tail -n 5 /qortal/qortal.log 2>/dev/null | grep -Eqi 'bootstrap' && exit 0
exit 1