// If the install fails, we will remove the install marker file allowing the installer to be able to run again.
// We also need to revert mgmt-users.properties
File mgmtUserPropertiesFile = new File(getBaseDir(),
"jbossas/standalone/configuration/mgmt-users.properties");
File standaloneXmlFile = new File(getBaseDir(), "jbossas/standalone/configuration/standalone-full.xml");
final FileReverter mgmtUserPropertiesReverter = new FileReverter(mgmtUserPropertiesFile);
final FileReverter standaloneXmlFileReverter = new FileReverter(standaloneXmlFile);
addUndoTask(new ControlCommand.UndoTask(
"Removing server-installed marker file and management user and reverting to original standalone-full.xml") {
public void performUndoWork() throws Exception {
getServerInstalledMarkerFile(getBaseDir()).delete();
mgmtUserPropertiesReverter.revert();
standaloneXmlFileReverter.revert();
}
});
org.apache.commons.exec.CommandLine commandLine = getCommandLine("rhq-installer");
if (ServerInstallerAction.UPGRADE == serverInstallerAction) {