mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
letsencrypt: improve active status check
Signed-off-by: nachoparker <nacho@ownyourbits.com>
This commit is contained in:
parent
110311fef6
commit
f3e3b01ab5
@ -15,7 +15,7 @@ letsencrypt=/usr/bin/letsencrypt
|
||||
|
||||
is_active()
|
||||
{
|
||||
[[ $( find /etc/letsencrypt/live/ -maxdepth 0 -empty | wc -l ) == 0 ]]
|
||||
[[ "${ACTIVE}" == "yes" ]] && [[ $( find /etc/letsencrypt/live/ -maxdepth 0 -empty | wc -l ) == 0 ]]
|
||||
}
|
||||
|
||||
tmpl_letsencrypt_domain() {
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
|
||||
[v1.39.2](https://github.com/nextcloud/nextcloudpi/commit/9598430) (2021-09-18) nextcloud-domain: make sure redis is running before it starts
|
||||
[v1.39.3](https://github.com/nextcloud/nextcloudpi/commit/295144c) (2021-09-18) letsencrypt: improve active status check
|
||||
|
||||
[v1.39.2 ](https://github.com/nextcloud/nextcloudpi/commit/fb5a2f3) (2021-09-18) nextcloud-domain: make sure redis is running before it starts
|
||||
|
||||
[v1.39.1 ](https://github.com/nextcloud/nextcloudpi/commit/6290c1f) (2021-09-09) nc-static-IP: take into account httpsonly
|
||||
|
||||
|
||||
@ -246,7 +246,20 @@ function is_active_app()
|
||||
# function
|
||||
unset is_active
|
||||
source "$script"
|
||||
[[ $( type -t is_active ) == function ]] && { is_active; return $?; }
|
||||
[[ $( type -t is_active ) == function ]] && {
|
||||
# read cfg parameters
|
||||
[[ -f "$cfg_file" ]] && {
|
||||
local cfg="$( cat "$cfg_file" )"
|
||||
local len="$(jq '.params | length' <<<"$cfg")"
|
||||
for (( i = 0 ; i < len ; i++ )); do
|
||||
local var="$(jq -r ".params[$i].id" <<<"$cfg")"
|
||||
local val="$(jq -r ".params[$i].value" <<<"$cfg")"
|
||||
eval "$var=$val"
|
||||
done
|
||||
}
|
||||
is_active
|
||||
return $?;
|
||||
}
|
||||
|
||||
# config
|
||||
[[ -f "$cfg_file" ]] || return 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user