00001
00002
00003 #include <iostream>
00004
00005 using std::cout ;
00006 using std::endl ;
00007
00008 #include "config.h"
00009 #include "BESServerUtils.h"
00010 #include "BESApp.h"
00011 #include "BESDebug.h"
00012
00013 void
00014 BESServerUtils::show_usage( const string &app_name )
00015 {
00016 cout << app_name
00017 << ": -i <INSTALL_DIR> -c <CONFIG> -d <STREAM> -h "
00018 << "-p <PORT> -s -u <UNIX_SOCKET> -v"
00019 << endl << endl ;
00020 cout << "-i back-end server installation directory" << endl ;
00021 cout << "-c use back-end server configuration file CONFIG" << endl ;
00022 cout << "-d set debugging to cerr or <filename>" << endl ;
00023 cout << "-h show this help screen and exit" << endl ;
00024 cout << "-p set port to PORT" << endl ;
00025 cout << "-s specifies a secure server using SLL authentication" << endl ;
00026 cout << "-u set unix socket to UNIX_SOCKET" << endl ;
00027 cout << "-v echos version and exit" << endl ;
00028 cout << endl ;
00029 BESDebug::Help( cout ) ;
00030 exit( 0 ) ;
00031 }
00032
00033 void
00034 BESServerUtils::show_version( const string &app_name )
00035 {
00036 cout << app_name
00037 << ": " << PACKAGE_STRING << endl ;
00038 exit( 0 ) ;
00039 }
00040