if(::arg().mustDo("help")) {
cout<<"syntax:"<<endl<<endl;
cout<<::arg().helpstring(::arg()["help"])<<endl;
+ cout<<"In addition, 'pdns_control help' can be used to retrieve a list\nof available commands from PowerDNS"<<endl;
exit(0);
}
arg().setCmd("help","Provide this helpful message");
arg().laxParse(argc,argv);
- if(arg().mustDo("help")) {
+ if(arg().mustDo("help") || arg().getCommands().empty()) {
cout<<"syntax: rec_control [options] command, options as below: "<<endl<<endl;
cout<<arg().helpstring(arg()["help"])<<endl;
- exit(0);
- }
-
- if(arg().getCommands().empty()) {
- cerr<<"syntax: rec_control [options] command, options as below: "<<endl<<endl;
- cerr<<arg().helpstring(arg()["help"])<<endl;
- exit(99);
+ cout<<"In addition, 'rec_control help' can be used to retrieve a list\nof available commands from PowerDNS"<<endl;
+ exit(arg().mustDo("help") ? 0 : 99);
}
string configname=::arg()["config-dir"]+"/recursor.conf";