examples/ubuntu/avahi_client: fix daemon detection On trusty the `service status` command out doesn't contain "process": ``` $ service avahi-daemon status avahi-daemon stop/waiting $ sudo service avahi-daemon start avahi-daemon start/running $ service avahi-daemon status avahi-daemon start/running ``` Change-Id: Id062c8f6ae47eb0a4bf411af6cd0575aef98b815 Reviewed-on: https://weave-review.googlesource.com/1096 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
diff --git a/libweave/examples/ubuntu/avahi_client.cc b/libweave/examples/ubuntu/avahi_client.cc index 424cee0..a77e85f 100644 --- a/libweave/examples/ubuntu/avahi_client.cc +++ b/libweave/examples/ubuntu/avahi_client.cc
@@ -24,7 +24,7 @@ } // namespace MdnsImpl::MdnsImpl() { - CHECK_EQ(0, std::system("service avahi-daemon status | grep process || " + CHECK_EQ(0, std::system("service avahi-daemon status | grep running || " "service avahi-daemon start")); thread_pool_.reset(avahi_threaded_poll_new()); CHECK(thread_pool_);