ARTEMIS-336 fix 'stop' command
This commit is contained in:
parent
d94c044e90
commit
2dcd10befc
|
@ -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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue