Move healthcheck and wp wrapper to src/wp-utils

This commit is contained in:
2024-05-19 21:04:27 +02:00
parent f86a28f3a6
commit 80d592cf97
2 changed files with 0 additions and 0 deletions

View File

@@ -1,21 +0,0 @@
#!/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 $?

View File

@@ -1,3 +0,0 @@
#!/usr/bin/env bash
/usr/local/bin/wp-cli --allow-root --path="/var/www/html" "$@"