HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2017-06-22 c888350841acae3180ec6998e45c02b58625a9c5
minor fixes
2 files modified
17 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java 2 ●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 15 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainModuleImpl.java
@@ -227,7 +227,7 @@
        }
        for (DomainOption opt : domainOptions) {
            if ("letsencrypt".equals(opt.getName()) && updatedDom.getServeraliases().contains("*")) {
                throw new HSAdminException("invalid domain option: " + opt.getName() + " for woldcard subdomain");
                throw new HSAdminException("invalid domain option: " + opt.getName() + " for wildcard subdomain");
            }
        }
        needsWriteAccessOn(oldDom, "update");
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -336,13 +336,20 @@
            return createLetencryptUnsetProcessor(dom);
        } else {
            // setup LE
            return new ShellProcessor("mkdir -p /var/lib/letsencrypt/webroot/" + domName +
            return new ShellProcessor(
                    "mkdir -p /var/lib/letsencrypt/webroot/" + domName +
                    " && chown root:root /var/lib/letsencrypt/webroot/" + domName +
                    " && chmod 0755 /var/lib/letsencrypt/webroot/" + domName +
                    " && mkdir -p /etc/letsencrypt/renwal/" + domName +
                    " && mkdir -p /var/lib/letsencrypt/webroot/" + domName + "/.well-known" +
                    " && chown root:root /var/lib/letsencrypt/webroot/" + domName + "/.well-known" +
                    " && chmod 0755 /var/lib/letsencrypt/webroot/" + domName + "/.well-known" +
                    " && mkdir -p /var/lib/letsencrypt/webroot/" + domName + "/.well-known/acme-challenge" +
                    " && chown root:root /var/lib/letsencrypt/webroot/" + domName + "/.well-known/acme-challenge" +
                    " && chmod 0755 /var/lib/letsencrypt/webroot/" + domName + "/.well-known/acme-challenge" +
                    " && mkdir -p /etc/letsencrypt/renewal/" +
                    " && mkdir -p /etc/letsencrypt/live/" + domName +
                    " && mkdir -p /etc/letsencrypt/archive/" + domName +
                    " && echo \"" + dom.getValidsubdomainnames() + "\" > /etc/letsencrypt/renwal/" + domName + ".conf" );
                    " && echo \"subs=" + dom.getValidsubdomainnames() + "\" > /etc/letsencrypt/renewal/" + domName + ".conf" );
        }
    }
@@ -351,7 +358,7 @@
        return new ShellProcessor("rm -rf  /var/lib/letsencrypt/webroot/" + domName +
                    " && rm -rf /etc/letsencrypt/archive/" + domName +
                    " && rm -rf /etc/letsencrypt/live/" + domName +
                    " && rm -f /etc/letsencrypt/renwal/" + domName + ".conf");
                    " && rm -f /etc/letsencrypt/renewal/" + domName + ".conf");
    }
}