ARTEMIS-336 fix 'stop' command

This commit is contained in:
jbertram 2016-01-18 11:48:40 -06:00 committed by Clebert Suconic
parent d94c044e90
commit 2dcd10befc
1 changed files with 7 additions and 3 deletions

View File

@ -19,7 +19,6 @@ package org.apache.activemq.artemis.cli.commands;
import java.io.File;
import io.airlift.airline.Command;
import org.apache.activemq.artemis.dto.BrokerDTO;
@Command(name = "stop", description = "stops the broker instance")
public class Stop extends Configurable {
@ -27,9 +26,14 @@ public class Stop extends Configurable {
@Override
public Object execute(ActionContext context) throws Exception {
super.execute(context);
BrokerDTO broker = getBrokerDTO();
File file = broker.server.getConfigurationFile().getParentFile();
String value = getConfiguration();
if (value != null && value.startsWith("xml:")) {
value = value.substring("xml:".length());
}
File file = new File(value).getParentFile();
File stopFile = new File(file, "STOP_ME");