HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2015-08-07 b58321b42a813749c894581d45c5188100bd27cc
do not overwrite existing cert
1 files modified
4 ■■■■ changed files
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java 4 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/dom/DomainProcessorFactory.java
@@ -272,8 +272,8 @@
            new ShellProcessor("export PEMS_DIR=/etc/apache2/pems-enabled/" + dom.getUser().getName() + " && "
                    + "mkdir -p $PEMS_DIR/ && "
                    + "cd $PEMS_DIR && "
                    + "echo \"\" > " + domName + ".chain && "
                    + "openssl req -x509 -newkey rsa:2048 -keyout " + domName + ".key -out " + domName + ".crt -days 1100 -nodes -sha256 -subj '/CN=" + domName + "' &&"
                    + "( ls " + domName + ".crt || ( echo \"\" > " + domName + ".chain && "
                    + "openssl req -x509 -newkey rsa:2048 -keyout " + domName + ".key -out " + domName + ".crt -days 1100 -nodes -sha256 -subj '/CN=" + domName + "' ) ) &&"
                    + "chmod 400 " + domName + "*"),
            new CreateFileProcessor("/de/hsadmin/mods/dom/apache-vhost.vm", templateVars, dom, "/etc/apache2/sites-available/" + domName + ".tmp", "root", "root", "644", true),
            new ShellProcessor(