mirror of
https://github.com/N0rthernL1ghts/wordpress.git
synced 2024-11-27 13:02:11 +01:00
21 lines
461 B
Bash
Executable File
21 lines
461 B
Bash
Executable File
#!/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 $? |