diff options
-rw-r--r-- | src/muniacli.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/muniacli.cc b/src/muniacli.cc index f0e151d..14f543e 100644 --- a/src/muniacli.cc +++ b/src/muniacli.cc @@ -318,19 +318,19 @@ int main(int argc, char** argv) } } - if(cmd == DEFAULT) { + if(!interactive && cmd == DEFAULT) { fprintf(stderr, "%s\n", USAGE); exit(1); } - if(!taskbyname.empty()) { + if(!interactive && !taskbyname.empty()) { taskbyid = -1; fprintf(stderr, "Option '-N, --name' is not yet supported\n"); fprintf(stderr, "%s\n", USAGE); exit(1); } - if(taskbyid.empty()) { + if(!interactive && taskbyid.empty()) { fprintf(stderr, "%s\n", USAGE); exit(1); } @@ -371,6 +371,6 @@ int main(int argc, char** argv) } */ - client("localhost", port); + client(host.c_str(), port); return 0; } |