make domain.delete more robust

This commit is contained in:
Peter Hormanns 2013-05-31 11:45:25 +02:00
parent d72bca4516
commit ce55f33d79

View File

@ -312,9 +312,9 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
int level = domName.split("\\.").length; int level = domName.split("\\.").length;
String linkPrefix = Integer.toString(100 - level); String linkPrefix = Integer.toString(100 - level);
Processor vhostDelProcessor = Processor vhostDelProcessor =
new ShellProcessor("rm /home/doms/" + domName + new ShellProcessor("rm -f /home/doms/" + domName +
" && rm /etc/apache2/sites-enabled/" + linkPrefix + "-" + domName + " && rm -f /etc/apache2/sites-enabled/" + linkPrefix + "-" + domName +
" && rm /etc/apache2/sites-available/" + domName + " && rm -f /etc/apache2/sites-available/" + domName +
" && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName + " && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName +
" && invoke-rc.d apache2 reload >/dev/null 2>&1"); " && invoke-rc.d apache2 reload >/dev/null 2>&1");
return vhostDelProcessor; return vhostDelProcessor;