// Continue with generic operations
Operation operation = getOperation(name);
File controlScriptPath = this.serverComponent.getControlScriptPath();
validateScriptFile(controlScriptPath);
ProcessExecution processExecution = ProcessExecutionUtility.createProcessExecution(controlScriptPath);
processExecution.setWaitForCompletion(1000 * 30); // 30 seconds - should be plenty
processExecution.setCaptureOutput(true); // essential, since we want to include the output in the result
addDefaultArguments(processExecution);
//we always add some arguments to the control script thus forcing the passthrough mode.
//therefore no matter if we use httpd, Apache.exe or apachectl, the -k argument will always
//be used to specify the operation to invoke.
if (operation != Operation.CONFIG_TEST) {
processExecution.getArguments().add("-k");
}
// request an avail check after a lifecycle operation
boolean availCheck = true;
switch (operation) {
case START: {
processExecution.getArguments().add("start");
break;
}
case STOP: {
processExecution.getArguments().add("stop");
break;
}
case RESTART: {
abortIfOsIsWindows(name);
processExecution.getArguments().add("restart");
break;
}
case START_SSL: {
abortIfOsIsWindows(name);
processExecution.getArguments().add("startssl");
break;
}
case GRACEFUL_RESTART: {
processExecution.getArguments().add((osIsWindows()) ? "restart" : "graceful");
break;
}
case CONFIG_TEST: {
// abortIfOsIsWindows(name);
processExecution.getArguments().add("-t");
availCheck = false;
break;
}
default: