diff --git a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
index e65df28..9af59a7 100644
--- a/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/pac/PacProcessorFactory.java
@@ -12,7 +12,6 @@ import javax.persistence.Query;
import de.hsadmin.core.model.AbstractEntity;
import de.hsadmin.core.qserv.CompoundProcessor;
-import de.hsadmin.core.qserv.CreateFileProcessor;
import de.hsadmin.core.qserv.EntityProcessorFactory;
import de.hsadmin.core.qserv.NullProcessor;
import de.hsadmin.core.qserv.Processor;
@@ -46,11 +45,8 @@ public class PacProcessorFactory implements EntityProcessorFactory {
createNetworkInterfacesProc(hive),
createIPTablesProc(),
createZonefileProc(em, pac),
- createSudouersProc(hive),
- createProftpdConfProc(hive),
createMakePacDirectoryStructure(unixUser),
createIfUp(pac),
- createHttpdVirtualProc(hive),
createSaltCallProc(),
createLinkSiteProc(pac.getName() + ".hostsharing.net"),
createAccountingRulesProc()));
@@ -74,8 +70,6 @@ public class PacProcessorFactory implements EntityProcessorFactory {
final WaitingTasksProcessor mainProcessor = new WaitingTasksProcessor( new CompoundProcessor(
createEtcHostsProc(hive),
createNetworkInterfacesProc(hive),
- createProftpdConfProc(hive),
- createHttpdVirtualProc(hive),
createSaltCallProc()
));
final Config config = Config.getInstance();
@@ -101,9 +95,6 @@ public class PacProcessorFactory implements EntityProcessorFactory {
createIfDown(pac),
createEtcHostsProc(hive),
createNetworkInterfacesProc(hive),
- createSudouersProc(hive),
- createProftpdConfProc(hive),
- createHttpdVirtualProc(hive),
createUnlinkSiteProc(pac.getName() + ".hostsharing.net"),
createHiveDNSRemoveProcessor(domainName),
createAccountingRulesProc(),
@@ -129,17 +120,6 @@ public class PacProcessorFactory implements EntityProcessorFactory {
return new ShellProcessor("mk-iptables-rules Accounting");
}
- private Processor createHttpdVirtualProc(Hive hive) throws HSAdminException {
- Processor domSetupProcessor = new CompoundProcessor(
- new CreateFileProcessor("/de/hsadmin/mods/pac/httpd-virtual.vm", hive,
- "/etc/apache2/conf.d/virtual.conf.tmp", "root", "root", "644", true),
- new ShellProcessor("(diff -q /etc/apache2/conf.d/virtual.conf.tmp /etc/apache2/conf.d/virtual.conf"
- + " && rm /etc/apache2/conf.d/virtual.conf.tmp )"
- + " || ( mv /etc/apache2/conf.d/virtual.conf.tmp /etc/apache2/conf.d/virtual.conf "
- + " && invoke-rc.d apache2 reload >/dev/null 2>&1 ) "));
- return domSetupProcessor;
- }
-
private Processor createEtcHostsProc(Hive hive) throws ProcessorException {
return new VelocityProcessor("/de/hsadmin/mods/pac/hosts.vm", hive, "/etc/hosts", true);
}
@@ -216,14 +196,6 @@ public class PacProcessorFactory implements EntityProcessorFactory {
return dnsSetupProcessor;
}
- private Processor createSudouersProc(Hive hive) throws ProcessorException {
- return new VelocityProcessor("/de/hsadmin/mods/pac/sudoers-pacs.vm", hive, "/etc/sudoers.d/pacs", true);
- }
-
- private Processor createProftpdConfProc(Hive hive) throws ProcessorException {
- return new VelocityProcessor("/de/hsadmin/mods/pac/proftpd-pacs-conf.vm", hive, "/etc/proftpd/pacs.conf", true);
- }
-
private Processor createAddUserProc(String pacName, UnixUser unixUser, String password) {
return new ShellProcessor(
"newusers", pacName + ":" + password + ":"
diff --git a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm b/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
deleted file mode 100644
index 9c9553f..0000000
--- a/hsarback/src/de/hsadmin/mods/pac/httpd-virtual.vm
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# This file is managed by HSAdmin.
-# Do not edit manually. Changes will be overwritten.
-#
-
-#foreach( $pac in ${hive.pacsWithIPAddress} )
-
- ServerName _
- ServerAdmin webmaster@${pac.name}.hostsharing.net
-
-
- Redirect 404 /
- ErrorDocument 404 "No virtual host configured for this host name."
-
-
-
-
-
- ServerName _
- ServerAdmin webmaster@${pac.name}.hostsharing.net
-
- SSLEngine On
- SSLCertificateFile /etc/apache2/pems-custom/_.hostsharing.net.crt
- SSLCertificateKeyFile /etc/apache2/pems-custom/_.hostsharing.net.key
- SSLCertificateChainFile /etc/apache2/pems-custom/_.hostsharing.net.chain
-
-
- SSLRequireSSL On
- Redirect 404 /
- ErrorDocument 404 "No virtual host configured for this host name."
-
-
-
-
-#end
diff --git a/hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm b/hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
deleted file mode 100644
index cf86562..0000000
--- a/hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# This file is managed by HSAdmin.
-# Do not edit manually. Changes will be overwritten.
-#
-
-#foreach( $pac in ${hive.webpacs} )
-
- DefaultRoot ~ ${pac.name}
- ServerName "${pac.name}.hostsharing.net"
- AllowOverwrite on
- AllowForeignAddress on
-
- Order allow,deny
- AllowGroup ${pac.name}
- DenyAll
-
-
- User ${pac.name}
- Group ${pac.name}
- UserAlias anonymous ${pac.name}
- UserAlias ftp ${pac.name}
- DirFakeUser on ftp
- DirFakeGroup on ftp
- DirFakeMode 000
- AuthAliasOnly on
-
- DenyAll
-
-
-
-
-#end
diff --git a/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm b/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm
deleted file mode 100644
index b1e20a3..0000000
--- a/hsarback/src/de/hsadmin/mods/pac/sudoers-pacs.vm
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# This file is managed by HSAdmin.
-# Do not edit manually. Changes will be overwritten.
-#
-
-#foreach( $pac in ${hive.webpacs} )
-${pac.name} ALL = (%${pac.name}) NOPASSWD: ALL
-#end
diff --git a/hsarback/src/de/hsadmin/mods/user/UnixUser.java b/hsarback/src/de/hsadmin/mods/user/UnixUser.java
index bce5741..ded08c7 100644
--- a/hsarback/src/de/hsadmin/mods/user/UnixUser.java
+++ b/hsarback/src/de/hsadmin/mods/user/UnixUser.java
@@ -53,7 +53,7 @@ public class UnixUser extends AbstractEntity implements Serializable {
@ManyToOne(fetch = FetchType.LAZY)
private Pac pac;
- @AnnFieldIO(validation="[a-zA-Z0-9\\_\\-\\.\\,\\ ]*", rw=ReadWriteAccess.READWRITE)
+ @AnnFieldIO(validation="[a-zA-Z0-9\\_\\-\\.\\ ]*", rw=ReadWriteAccess.READWRITE)
@Column(name = "comment", columnDefinition = "character varying(128)")
private String comment;
diff --git a/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java b/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
index ced4297..e04a838 100644
--- a/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
+++ b/hsarback/src/de/hsadmin/mods/user/UnixUserProcessorFactory.java
@@ -41,9 +41,9 @@ public class UnixUserProcessorFactory implements EntityProcessorFactory {
"usermod -c '" + user.getComment() + "'" + " -d '"
+ user.getHomedir() + "'" + " -s '" + user.getShell()
+ "' " + user.getName()));
- if (user.getPassword() != null && user.getPassword().length() > 0)
- aCP.appendProcessor(new ShellProcessor("chpasswd ", user.getName()
- + ":" + user.getPassword() + "\n"));
+ if (user.getPassword() != null && user.getPassword().length() > 0) {
+ aCP.appendProcessor(new ShellProcessor("chpasswd ", user.getName() + ":" + user.getPassword() + "\n"));
+ }
aCP.appendProcessor(new ShellProcessor("salt-call state.sls pacs >/dev/null 2>&1"));
return aCP;
}
@@ -66,6 +66,7 @@ public class UnixUserProcessorFactory implements EntityProcessorFactory {
CompoundProcessor proc = new CompoundProcessor(killProcessesProc, userdelProc);
proc.appendProcessor(new ShellProcessor("rm -f '/var/spool/cron/crontabs/" + uid + "'"));
proc.appendProcessor(new ShellProcessor("rm -f '/var/mail/" + uid + "'"));
+ proc.appendProcessor(new ShellProcessor("rm -f '/var/lib/systemd/linger/" + uid + "'"));
proc.appendProcessor(new ShellProcessor("rm -rf '/home/storage/" + pac + "/users/" + ( uid.length() > 6 ? uid.substring(6) : '_' ) + "/'"));
proc.appendProcessor(new ShellProcessor("salt-call state.sls pacs >/dev/null 2>&1"));
return proc;