pac.add: Create .bak directory, refresh traffic accounting rules
pac.delete: Refresh traffic accounting rules
This commit is contained in:
parent
7358d24835
commit
c1ecf8794a
@ -46,12 +46,17 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
createProftpdConfProc(hiveValues, pacValuesList),
|
createProftpdConfProc(hiveValues, pacValuesList),
|
||||||
createMakePacDirectoryStructure(unixUser),
|
createMakePacDirectoryStructure(unixUser),
|
||||||
createIfUp(pacName),
|
createIfUp(pacName),
|
||||||
createHttpdVirtualProc(pacName, pacValuesList));
|
createHttpdVirtualProc(pacName, pacValuesList),
|
||||||
|
createAccountingRulesProc());
|
||||||
WaitingTasksProcessor secProcessor = new WaitingTasksProcessor(priProcessor);
|
WaitingTasksProcessor secProcessor = new WaitingTasksProcessor(priProcessor);
|
||||||
// secProcessor.appendProcessor(pac.getHiveName(), createSendEMailProc(pacName, customerEMail, emailVars), "send email to customer");
|
// secProcessor.appendProcessor(pac.getHiveName(), createSendEMailProc(pacName, customerEMail, emailVars), "send email to customer");
|
||||||
return secProcessor;
|
return secProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Processor createAccountingRulesProc() {
|
||||||
|
return new ShellProcessor("mk-iptables-rules Accounting");
|
||||||
|
}
|
||||||
|
|
||||||
private Processor createHttpdVirtualProc(
|
private Processor createHttpdVirtualProc(
|
||||||
String pacName, List<Map<String, String>> pacValuesList) throws ProcessorException {
|
String pacName, List<Map<String, String>> pacValuesList) throws ProcessorException {
|
||||||
Processor domSetupProcessor = new CompoundProcessor(
|
Processor domSetupProcessor = new CompoundProcessor(
|
||||||
@ -85,7 +90,8 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
createNetworkInterfacesProc(hiveValues, pacValuesList),
|
createNetworkInterfacesProc(hiveValues, pacValuesList),
|
||||||
createSudouersProc(hiveValues, pacValuesList),
|
createSudouersProc(hiveValues, pacValuesList),
|
||||||
createProftpdConfProc(hiveValues, pacValuesList),
|
createProftpdConfProc(hiveValues, pacValuesList),
|
||||||
createHttpdVirtualProc(pac.getName(), pacValuesList)));
|
createHttpdVirtualProc(pac.getName(), pacValuesList),
|
||||||
|
createAccountingRulesProc()));
|
||||||
waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(pac.getName()), "remove packet");
|
waitingProcessor.appendProcessor(pac.getHiveName(), createDelUserProc(pac.getName()), "remove packet");
|
||||||
return waitingProcessor;
|
return waitingProcessor;
|
||||||
}
|
}
|
||||||
@ -155,11 +161,13 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
String username = unixUser.getName();
|
String username = unixUser.getName();
|
||||||
return new ShellProcessor("chmod 711 " + homedir + " && " +
|
return new ShellProcessor("chmod 711 " + homedir + " && " +
|
||||||
"su -l " + username + " -s \"/bin/bash\" -c \"mkdir -p " +
|
"su -l " + username + " -s \"/bin/bash\" -c \"mkdir -p " +
|
||||||
|
homedir + "/.bak " +
|
||||||
homedir + "/doms " +
|
homedir + "/doms " +
|
||||||
homedir + "/etc " +
|
homedir + "/etc " +
|
||||||
homedir + "/users " +
|
homedir + "/users " +
|
||||||
homedir + "/var " +
|
homedir + "/var " +
|
||||||
"\" && " +
|
"\" && " +
|
||||||
|
"chmod 0700 " + homedir + "/.bak && " +
|
||||||
"chown httpd " + homedir + "/doms && " +
|
"chown httpd " + homedir + "/doms && " +
|
||||||
"chmod 1550 " + homedir + "/doms && " +
|
"chmod 1550 " + homedir + "/doms && " +
|
||||||
"chmod 2700 " + homedir + "/etc && " +
|
"chmod 2700 " + homedir + "/etc && " +
|
||||||
|
Loading…
Reference in New Issue
Block a user