This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
freshrss/overlay/usr/local/bin/healthcheck
Robert Kaussow ab2ed79a3a
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
fix: use api url for healthcheck if enabled (#105)
Reviewed-on: docker/freshrss#105
2023-06-10 23:55:34 +02:00

13 lines
363 B
Bash
Executable File

#!/usr/bin/env sh
# shellcheck disable=SC3040
set -eo pipefail
if [ "$(gomplate -i '{{ getenv "FRESHRSS_API_ENABLED" "false" | conv.ToBool }}')" = "true" ]; then
(php -r "readfile('http://127.0.0.1:8080/api/fever.php');" | grep -q 'api_versionX') || exit 1
else
(php -r "readfile('http://127.0.0.1:8080/i/');" | grep -q 'jsonVars') || exit 1
fi
exit 0