fix error user -> username
This commit is contained in:
parent
85ea7c6544
commit
90d6ce1b6f
@ -350,34 +350,37 @@ public class DomainProcessorFactory implements EntityProcessorFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Processor createApacheVHostDeleteProcessor(Domain dom) {
|
private Processor createApacheVHostDeleteProcessor(Domain dom) {
|
||||||
final String domName = dom.getName();
|
final String domname = dom.getName();
|
||||||
final int level = domName.split("\\.").length;
|
final int level = domname.split("\\.").length;
|
||||||
final String linkPrefix = Integer.toString(100 - level);
|
final String linkPrefix = Integer.toString(100 - level);
|
||||||
|
final UnixUser user = dom.getUser();
|
||||||
|
final String homedir = user.getHomedir();
|
||||||
if (dom.isPacDomain()) {
|
if (dom.isPacDomain()) {
|
||||||
|
final String username = user.getName();
|
||||||
return
|
return
|
||||||
new ShellProcessor("rm -f /home/doms/" + domName +
|
new ShellProcessor("rm -f /home/doms/" + domname +
|
||||||
" && rm -f /etc/apache2/sites-enabled/" + linkPrefix + "-" + domName +
|
" && rm -f /etc/apache2/sites-enabled/" + linkPrefix + "-" + domname +
|
||||||
" && rm -f /etc/apache2/sites-available/" + domName +
|
" && rm -f /etc/apache2/sites-available/" + domname +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".crt" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".crt" +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".key" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".key" +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".chain" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".chain" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".crt" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".crt" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".key" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".key" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".chain" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".chain" +
|
||||||
" && chown -R " + dom.getUser() + ":" + dom.getUser() + " " + dom.getUser().getHomedir() + "/doms/" + domName +
|
" && chown -R " + username + ":" + username + " " + homedir + "/doms/" + domname +
|
||||||
" && invoke-rc.d apache2 reload >/dev/null 2>&1");
|
" && invoke-rc.d apache2 reload >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
new ShellProcessor("rm -f /home/doms/" + domName +
|
new ShellProcessor("rm -f /home/doms/" + domname +
|
||||||
" && rm -f /etc/apache2/sites-enabled/" + linkPrefix + "-" + domName +
|
" && rm -f /etc/apache2/sites-enabled/" + linkPrefix + "-" + domname +
|
||||||
" && rm -f /etc/apache2/sites-available/" + domName +
|
" && rm -f /etc/apache2/sites-available/" + domname +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".crt" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".crt" +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".key" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".key" +
|
||||||
" && rm -f /etc/apache2/pems-enabled/" + domName + ".chain" +
|
" && rm -f /etc/apache2/pems-enabled/" + domname + ".chain" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".crt" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".crt" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".key" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".key" +
|
||||||
" && rm -f /etc/apache2/pems-generated/" + domName + ".chain" +
|
" && rm -f /etc/apache2/pems-generated/" + domname + ".chain" +
|
||||||
" && rm -rf " + dom.getUser().getHomedir() + "/doms/" + domName +
|
" && rm -rf " + homedir + "/doms/" + domname +
|
||||||
" && invoke-rc.d apache2 reload >/dev/null 2>&1");
|
" && invoke-rc.d apache2 reload >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user