diff --git a/src/main/java/emissary/command/ServiceCommand.java b/src/main/java/emissary/command/ServiceCommand.java index 0da3624e86..8c5b776878 100644 --- a/src/main/java/emissary/command/ServiceCommand.java +++ b/src/main/java/emissary/command/ServiceCommand.java @@ -113,8 +113,13 @@ public void run(CommandLine c) { throw new EmissaryRuntimeException("Emissary " + getServiceName() + " is already running"); } } else { - // no running server so fire it up - startService(); + if (isPause()) { + // we hadn't intended to start the service, so don't try to do so now + throw new EmissaryRuntimeException("Error pausing service: request returned status " + response.getStatus()); + } else { + // no running server so fire it up + startService(); + } } } }