HSAdmin Backend Domains, E-Mail, Datenbanken
Peter Hormanns
2012-10-16 787a086baf4030905bc79d6d9ab6eda9a5c50452
fix errors in virtual.conf
1 files modified
11 ■■■■ changed files
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java 11 ●●●● patch | view | raw | blame | history
hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -60,18 +60,17 @@
                new CreateFileProcessor("/de/hsadmin/mods/pac/httpd-virtual.jtpl", 
                        new HashMap<String, String>(), pacValuesList.iterator(), 
                        "/etc/apache2/virtual.conf.tmp", "root", "root", "644", true),
                new ShellProcessor("for PEM in $( cat virtual.conf.tmp | grep SSLCertificateFile | cut -c24- ); do " +
                new ShellProcessor("for PEM in $( cat /etc/apache2/virtual.conf.tmp | grep SSLCertificateFile | cut -c24- ); do " +
                        "ls $PEM >/dev/null 2>&1 || ( " +
                        " sed -i \"/SSLCertificateFile.*${PEM:18}/c \\\n" +
                        "\\ \\ \\ \\ SSLCertificateFile \\/etc\\/apache2\\/pems\\/default.pem\" virtual.conf.tmp && " +
                        "\\ \\ \\ \\ SSLCertificateFile \\/etc\\/apache2\\/pems\\/default.pem\" /etc/apache2/virtual.conf.tmp && " +
                        " sed -i \"/SSLCertificateChainFile.*${PEM:18:5}.chain.pem/c \\\n" +
                        "\\ \\ \\ \\ SSLCertificateChainFile \\/etc\\/apache2\\/pems\\/default.chain.pem\" virtual.conf.tmp " +
                        "\\ \\ \\ \\ SSLCertificateChainFile \\/etc\\/apache2\\/pems\\/default.chain.pem\" /etc/apache2/virtual.conf.tmp " +
                        "); " +
                        "done"),
                new ShellProcessor("for PEM in $( cat virtual.conf.tmp | grep SSLCertificateChainFile | cut -c24- ); do " +
                new ShellProcessor("for PEM in $( /etc/apache2/cat virtual.conf.tmp | grep SSLCertificateChainFile | cut -c24- ); do " +
                        "ls $PEM >/dev/null 2>&1 || " +
                        " sed -i \"/SSLCertificateChainFile.*${PEM:18:5}.chain.pem/d \" virtual.conf.tmp " +
                        "); " +
                        " sed -i \"/SSLCertificateChainFile.*${PEM:18:5}.chain.pem/d \" /etc/apache2/virtual.conf.tmp ; " +
                        "done"),
                new ShellProcessor("(diff -q /etc/apache2/virtual.conf.tmp /etc/apache2/virtual.conf"
                                + " && rm /etc/apache2/virtual.conf.tmp )"