Skip to content
Snippets Groups Projects
Commit e7d33623 authored by Bob Mottram's avatar Bob Mottram
Browse files

Exclude chat and mail subdomains from letsencrypt removals

parent 09ffe0d9
No related branches found
No related tags found
No related merge requests found
......@@ -376,11 +376,15 @@ function letsencrypt_renewals {
echo ' touch ~/letsencrypt_failed';
echo ' fi';
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if ! grep -q \"\$LETSENCRYPT_DOMAIN\" /etc/nginx/sites-available/*; then";
echo ' # remove the cert';
echo " rm -rf \"/etc/letsencrypt/live/\${LETSENCRYPT_DOMAIN}\"";
echo " rm -rf \"/etc/letsencrypt/archive/\${LETSENCRYPT_DOMAIN}\"";
echo " rm \"/etc/letsencrypt/renewal/\${LETSENCRYPT_DOMAIN}.conf\"";
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"chat.$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"mail.$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if ! grep -q \"\$LETSENCRYPT_DOMAIN\" /etc/nginx/sites-available/*; then";
echo ' # remove the cert';
echo " rm -rf \"/etc/letsencrypt/live/\${LETSENCRYPT_DOMAIN}\"";
echo " rm -rf \"/etc/letsencrypt/archive/\${LETSENCRYPT_DOMAIN}\"";
echo " rm \"/etc/letsencrypt/renewal/\${LETSENCRYPT_DOMAIN}.conf\"";
echo ' fi';
echo ' fi';
echo ' fi';
echo ' fi';
echo ' fi';
......@@ -455,11 +459,15 @@ function letsencrypt_renewals {
echo ' touch ~/letsencrypt_failed';
echo ' fi';
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if ! grep -q \"\$LETSENCRYPT_DOMAIN\" /etc/nginx/sites-available/*; then";
echo ' # remove the cert';
echo " rm -rf \"/etc/letsencrypt/live/\${LETSENCRYPT_DOMAIN}\"";
echo " rm -rf \"/etc/letsencrypt/archive/\${LETSENCRYPT_DOMAIN}\"";
echo " rm \"/etc/letsencrypt/renewal/\${LETSENCRYPT_DOMAIN}.conf\"";
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"chat.$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if [[ \"\$LETSENCRYPT_DOMAIN\" != \"mail.$DEFAULT_DOMAIN_NAME\" ]]; then";
echo " if ! grep -q \"\$LETSENCRYPT_DOMAIN\" /etc/nginx/sites-available/*; then";
echo ' # remove the cert';
echo " rm -rf \"/etc/letsencrypt/live/\${LETSENCRYPT_DOMAIN}\"";
echo " rm -rf \"/etc/letsencrypt/archive/\${LETSENCRYPT_DOMAIN}\"";
echo " rm \"/etc/letsencrypt/renewal/\${LETSENCRYPT_DOMAIN}.conf\"";
echo ' fi';
echo ' fi';
echo ' fi';
echo ' fi';
echo ' fi';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment