if (service == null)
error("Non existent service %s", s);
else {
if (service.isRunning()) {
try {
String result = service.stop();
if (result != null)
error("Failed to stop: %s", result);
}
catch (Exception e) {
exception(e, "Could not stop service %s due to %s", s, e.getMessage());