Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing: Acme script breaking during install on Ubuntu with Apache and with configured server FQDN #14527

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
19 changes: 19 additions & 0 deletions resources/install-letsencrypt-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,17 @@ elif [ "$OPENRESTY_INSTALL_CHECK" = "installed" ] || [ "$OPENRESTY_INSTALL_CHECK
RELOAD_CMD="systemctl force-reload openresty.service"
elif [ "$APACHE_INSTALL_CHECK" = "installed" ] || [ "$APACHE_INSTALL_CHECK" = "unpacked" ] ; then
RELOAD_CMD="systemctl force-reload apache2.service"

if [[ "$(hostname)" == "$DOMAIN" ]]; then
DEFAULT_SITE_CONF="/etc/apache2/sites-enabled/000-default.conf"
if [[ -f "$DEFAULT_SITE_CONF" ]]; then # Checks if the default site is enabled
echo "Default Apache site may conflict with Let's Encrypt process"
a2dissite 000-default.conf && ${RELOAD_CMD}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the jitsi-meet package should be touching that configuration, people maybe using it for some other stuff.
If you think that maybe a problem we should print some warning to inform the user, so the user can decide what to do.

ENABLEDEFAULT_CMD="a2ensite 000-default.conf && ${RELOAD_CMD}"
echo "Disabled default Apache site"
fi
fi

else
RELOAD_CMD="echo 'No webserver found'"
fi
Expand All @@ -72,3 +83,11 @@ if [ ${ISSUE_FAILED_CODE} -ne 0 ] ; then
else
eval "$INSTALL_CERT_CMD"
fi

if [[ -n "$ENABLEDEFAULT_CMD" ]]; then
echo "Cleanup: Enabling default Apache site back"
eval "$ENABLEDEFAULT_CMD"
ENABLEDEFAULT_CMD=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, you enable it back ... why is the 000-default.conf a problem actually?

echo "Cleanup succeeded"
fi