2006-07-17 Esteban Sanchez <estebans@artica.es>

* main.cc: Added "--help" option.

        * pandora_strutils.cpp: Renamed to pandora_strutils.cc

        * bin/PandoraAgent.exe: Updated to the new commit.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@139 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
esanchezm 2006-07-17 11:18:12 +00:00
parent 2790c437ac
commit a3a257129d
4 changed files with 21 additions and 3 deletions

View File

@ -1,4 +1,12 @@
2006-07-14 Esteban Sanchez <estebans@artica.es>
2006-07-17 Esteban Sanchez <estebans@artica.es>
* main.cc: Added "--help" option.
* pandora_strutils.cpp: Renamed to pandora_strutils.cc
* bin/PandoraAgent.exe: Updated to the new commit.
2006-07-17 Esteban Sanchez <estebans@artica.es>
* modules/pandora_module_factory.cc: Removed unnecessary debug.

View File

@ -26,6 +26,7 @@
#define SERVICE_INSTALL_CMDLINE_PARAM "--install"
#define SERVICE_UNINSTALL_CMDLINE_PARAM "--uninstall"
#define SSH_TEST_CMDLINE_PARAM "--test-ssh"
#define HELP_CMDLINE_PARAM "--help"
int
main (int argc, char *argv[]) {
@ -65,15 +66,24 @@ main (int argc, char *argv[]) {
} catch (Pandora_Exception e) {
return 1;
}
return 0;
} else if (_stricmp(argv[i], HELP_CMDLINE_PARAM) == 0) {
cout << "Usage: " << argv[0] << " [OPTION]" << endl << endl;
cout << "Available options are:" << endl;
cout << "\t" << SERVICE_INSTALL_CMDLINE_PARAM << ": Install the Pandora Agent service." << endl;
cout << "\t" << SERVICE_UNINSTALL_CMDLINE_PARAM << ": Uninstall the Pandora Agent service." << endl;
cout << "\t" << SSH_TEST_CMDLINE_PARAM << ": Test the SSH Pandora Agent configuration." << endl;
return 0;
} else {
cerr << "Usage: " << argv[0] << "[" << SERVICE_INSTALL_CMDLINE_PARAM
cout << "Usage: " << argv[0] << " [" << SERVICE_INSTALL_CMDLINE_PARAM
<< "] [" << SERVICE_UNINSTALL_CMDLINE_PARAM << "]" << endl;
cerr << "Run " << argv[0] << "with " << HELP_CMDLINE_PARAM << " parameter for more info." << endl;
return 1;
}
}
service->run ();
delete service;
return 0;
}