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 #=================================================