error in update of file virtual.conf corrected
This commit is contained in:
parent
c1ac39ec78
commit
fbbb1f4132
@ -113,10 +113,10 @@ public class PacModuleImpl extends AbstractModuleImpl {
|
||||
public AbstractEntity update(AbstractEntity entity)
|
||||
throws HSAdminException {
|
||||
UnixUser loginUser = getTransaction().getLoginUser();
|
||||
if (entity instanceof Pac) {
|
||||
Pac pac = (Pac) entity;
|
||||
} else {
|
||||
if (!(entity instanceof Pac)) {
|
||||
throw new AuthorisationException(loginUser, "update", entity);
|
||||
// } else {
|
||||
// Pac pac = (Pac) entity;
|
||||
}
|
||||
needsWriteAccessOn(entity, "update");
|
||||
return super.update(entity);
|
||||
|
@ -57,14 +57,17 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
||||
private Processor createHttpdVirtualProc(
|
||||
String pacName, List<Map<String, String>> pacValuesList) throws ProcessorException {
|
||||
Processor domSetupProcessor = new CompoundProcessor(
|
||||
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 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("ls /etc/apache2/pems/" + pacName + ".pem >/dev/null 2>&1 " + "&& sed -i '/SSLCertificate.*default/d' " + "/etc/apache2/apache.conf.tmp"
|
||||
+ " && (ls /etc/apache2/pems/" + pacName + ".chain.pem >/dev/null 2>&1"
|
||||
+ " || sed -i '/SSLCertificateChain.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp)"
|
||||
+ " || sed -i '/SSLCertificate.*" + pacName + "/d' " + "/etc/apache2/virtual.conf.tmp"),
|
||||
new ShellProcessor("(diff -q /etc/apache2/apache.conf.tmp /etc/apache2/apache.conf"
|
||||
+ " && rm /etc/apache2/apache.conf.tmp)"
|
||||
+ " || invoke-rc.d apache2 reload >/dev/null 2>&1"));
|
||||
new ShellProcessor("(diff -q /etc/apache2/virtual.conf.tmp /etc/apache2/virtual.conf"
|
||||
+ " && rm /etc/apache2/virtual.conf.tmp )"
|
||||
+ " || ( mv /etc/apache2/virtual.conf.tmp /etc/apache2/virtual.conf "
|
||||
+ " && invoke-rc.d apache2 reload >/dev/null 2>&1 ) "));
|
||||
return domSetupProcessor;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user