diff --git a/client/snapclient.cpp b/client/snapclient.cpp index 381b91ae..50ed5070 100644 --- a/client/snapclient.cpp +++ b/client/snapclient.cpp @@ -262,6 +262,12 @@ int main(int argc, char** argv) else throw SnapException("Invalid log sink: " + settings.logging.sink); +#if !defined(HAS_AVAHI) && !defined(HAS_BONJOUR) + if (settings.server.host.empty()) + throw SnapException("Snapserver host not configured and mDNS not available, please configure with \"--host\"."); +#endif + + #ifdef HAS_DAEMON std::unique_ptr daemon; if (daemonOption->is_set()) @@ -383,6 +389,6 @@ int main(int argc, char** argv) exitcode = EXIT_FAILURE; } - LOG(NOTICE, LOG_TAG) << "daemon terminated." << endl; + LOG(NOTICE, LOG_TAG) << "Snapclient terminated." << endl; exit(exitcode); } diff --git a/server/snapserver.cpp b/server/snapserver.cpp index a5ce15ea..185b8ed7 100644 --- a/server/snapserver.cpp +++ b/server/snapserver.cpp @@ -327,6 +327,6 @@ int main(int argc, char* argv[]) exitcode = EXIT_FAILURE; } Config::instance().save(); - LOG(NOTICE) << "daemon terminated." << endl; + LOG(NOTICE) << "Snapserver terminated." << endl; exit(exitcode); }