wait for kill
This commit is contained in:
parent
5481bda5e2
commit
37b3643db1
@ -7,7 +7,6 @@ import de.hsadmin.core.qserv.CompoundProcessor;
|
||||
import de.hsadmin.core.qserv.EntityProcessorFactory;
|
||||
import de.hsadmin.core.qserv.Processor;
|
||||
import de.hsadmin.core.qserv.ShellProcessor;
|
||||
import de.hsadmin.hostsharing.QuotaLimit;
|
||||
|
||||
/**
|
||||
* Factory class which creates Processor instances for dealing with UNIX user
|
||||
@ -57,7 +56,7 @@ public class UnixUserProcessorFactory implements EntityProcessorFactory {
|
||||
UnixUser user = (UnixUser) entity;
|
||||
String uid = user.getName();
|
||||
if (uid != null && uid.length() > 4) {
|
||||
Processor killProcessesProc = new ShellProcessor("killall -u " + uid + " || echo -n 'no processes'");
|
||||
Processor killProcessesProc = new ShellProcessor("killall -u " + uid + " && sleep 2 || echo -n 'no processes'");
|
||||
Processor userdelProc = null;
|
||||
if (user.isDefaultHomedir()) {
|
||||
userdelProc = new ShellProcessor("userdel " + uid + " && rm -rf '" + user.getHomedir() + "'");
|
||||
|
Loading…
Reference in New Issue
Block a user