minor fixes

This commit is contained in:
Peter Hormanns 2017-06-22 19:07:07 +02:00
parent 9185975ed6
commit c888350841
2 changed files with 12 additions and 5 deletions

View File

@ -227,7 +227,7 @@ public class DomainModuleImpl extends AbstractModuleImpl {
}
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");

View File

@ -336,13 +336,20 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
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 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
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");
}
}