From 1395fe8f0babd830e5f1f8b659e5b9470d90f7dd Mon Sep 17 00:00:00 2001 From: DDATAA <45762540+Ddataa@users.noreply.github.com> Date: Mon, 31 Oct 2022 17:51:47 +0100 Subject: [PATCH] Update install --- scripts/install | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/install b/scripts/install index 92d19ed..2b46fa6 100644 --- a/scripts/install +++ b/scripts/install @@ -76,6 +76,19 @@ if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then yunohost domain config set $sandboxdomain -a "mail_in=0&mail_out=0" fi +#================================================= +# CHECK IF THE MAIN DOMAIN IS ALREADY SETUP WITH CORRECT CERTIFICATE WHEN PUBLIC +#================================================= +# We don't test that in CI +if ! [ ${PACKAGE_CHECK_EXEC:-0} -eq 1 ]; then + if [ $is_public -eq 1 ] + then + if ! yunohost domain cert status $domain | grep -q "summary: Great!"; then + ynh_die "The domain $domain does not have correct Let's Encrypt certificates !" + fi + fi +fi + #================================================= # INSTALL DEPENDENCIES #=================================================