mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-12-02 16:33:01 +01:00
21 lines
461 B
Plaintext
21 lines
461 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
|
||
|
function main() {
|
||
|
FULL_CHECK="${1:-false}"
|
||
|
|
||
|
if [ -f "/tmp/.wp-unhealthy" ]; then
|
||
|
echo "Error: WordPress health is compromised: $(cat "/tmp/.wp-unhealthy")"
|
||
|
return 1
|
||
|
fi
|
||
|
|
||
|
# If FULL_CHECK is not requested, site functionality check with curl is skipped
|
||
|
if [ "${FULL_CHECK}" = "false" ]; then
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
curl -sSf --output "/dev/null" "http://localhost/"
|
||
|
return $?
|
||
|
}
|
||
|
|
||
|
main "${@}"
|
||
|
exit $?
|