fix: use api url for healthcheck if enabled #105
@ -8,15 +8,15 @@ return array(
|
|||||||
'title' => '{{ getenv "FRESHRSS_TITLE" "FreshRSS" }}',
|
'title' => '{{ getenv "FRESHRSS_TITLE" "FreshRSS" }}',
|
||||||
'meta_description' => '{{ getenv "FRESHRSS_META_DESCRIPTION" }}',
|
'meta_description' => '{{ getenv "FRESHRSS_META_DESCRIPTION" }}',
|
||||||
'default_user' => '{{ getenv "FRESHRSS_DEFAULT_USER" "admin" }}',
|
'default_user' => '{{ getenv "FRESHRSS_DEFAULT_USER" "admin" }}',
|
||||||
'allow_anonymous' => {{ getenv "FRESHRSS_ALLOW_ANONYMOUS" "false" }},
|
'allow_anonymous' => {{ getenv "FRESHRSS_ALLOW_ANONYMOUS" "false" | conv.ToBool }},
|
||||||
'allow_anonymous_refresh' => {{ getenv "FRESHRSS_ALLOW_ANONYMOUS_REFRESH" "false" }},
|
'allow_anonymous_refresh' => {{ getenv "FRESHRSS_ALLOW_ANONYMOUS_REFRESH" "false" | conv.ToBool }},
|
||||||
'auth_type' => '{{ getenv "FRESHRSS_AUTH_TYPE" "form" }}',
|
'auth_type' => '{{ getenv "FRESHRSS_AUTH_TYPE" "form" }}',
|
||||||
'api_enabled' => {{ getenv "FRESHRSS_API_ENABLED" "false" }},
|
'api_enabled' => {{ getenv "FRESHRSS_API_ENABLED" "false" | conv.ToBool }},
|
||||||
'unsafe_autologin_enabled' => {{ getenv "FRESHRSS_UNSAFE_AUTOLOGIN_ENABLED" "false" }},
|
'unsafe_autologin_enabled' => {{ getenv "FRESHRSS_UNSAFE_AUTOLOGIN_ENABLED" "false" | conv.ToBool }},
|
||||||
'simplepie_syslog_enabled' => {{ getenv "FRESHRSS_SIMPLEPIE_SYSLOG_ENABLED" "true" }},
|
'simplepie_syslog_enabled' => {{ getenv "FRESHRSS_SIMPLEPIE_SYSLOG_ENABLED" "true" | conv.ToBool }},
|
||||||
'pubsubhubbub_enabled' => {{ getenv "FRESHRSS_PUBSUBHUBBUB_ENABLED" "false" }},
|
'pubsubhubbub_enabled' => {{ getenv "FRESHRSS_PUBSUBHUBBUB_ENABLED" "false" | conv.ToBool }},
|
||||||
'allow_robots' => {{ getenv "FRESHRSS_ALLOW_ROBOTS" "false" }},
|
'allow_robots' => {{ getenv "FRESHRSS_ALLOW_ROBOTS" "false" | conv.ToBool }},
|
||||||
'allow_referrer' => {{ getenv "FRESHRSS_ALLOW_REFERRER" "false" }},
|
'allow_referrer' => {{ getenv "FRESHRSS_ALLOW_REFERRER" "false" | conv.ToBool }},
|
||||||
|
|
||||||
'limits' => array(
|
'limits' => array(
|
||||||
'cookie_duration' => {{ getenv "FRESHRSS_LIMITS_COOKIE_DURATION" "2592000" }},
|
'cookie_duration' => {{ getenv "FRESHRSS_LIMITS_COOKIE_DURATION" "2592000" }},
|
||||||
|
@ -47,6 +47,7 @@ if [ $EXITCODE -eq 3 ]; then
|
|||||||
elif [ $EXITCODE -eq 0 ]; then
|
elif [ $EXITCODE -eq 0 ]; then
|
||||||
log_info "FreshRSS user successfully created"
|
log_info "FreshRSS user successfully created"
|
||||||
./cli/list-users.php | xargs -n1 ./cli/actualize-user.php --user "${FRESHRSS_DEFAULT_USER:-admin}"
|
./cli/list-users.php | xargs -n1 ./cli/actualize-user.php --user "${FRESHRSS_DEFAULT_USER:-admin}"
|
||||||
|
./cli/access-permissions.sh
|
||||||
else
|
else
|
||||||
log_error "FreshRSS error during the creation of a user: ${ERROR}"
|
log_error "FreshRSS error during the creation of a user: ${ERROR}"
|
||||||
exit $EXITCODE
|
exit $EXITCODE
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
(php -r "readfile('http://127.0.0.1:8080/i/');" | grep -q 'jsonVars') || exit 1
|
# 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
|
||||||
|
Reference in New Issue
Block a user