00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 #include "config.h"
00034
00035 #include <cstdlib>
00036 #include <iostream>
00037
00038 using std::cout ;
00039 using std::endl ;
00040
00041 #include "BESServerUtils.h"
00042 #include "BESApp.h"
00043 #include "BESDebug.h"
00044
00045 void
00046 BESServerUtils::show_usage( const string &app_name )
00047 {
00048 cout << app_name
00049 << ": -i <INSTALL_DIR> -c <CONFIG> -d <STREAM> -h "
00050 << "-p <PORT> -s -u <UNIX_SOCKET> -v"
00051 << endl << endl ;
00052 cout << "-i back-end server installation directory" << endl ;
00053 cout << "-c use back-end server configuration file CONFIG" << endl ;
00054 cout << "-d set debugging to cerr or <filename>" << endl ;
00055 cout << "-h show this help screen and exit" << endl ;
00056 cout << "-p set port to PORT" << endl ;
00057 cout << "-s specifies a secure server using SLL authentication" << endl ;
00058 cout << "-u set unix socket to UNIX_SOCKET" << endl ;
00059 cout << "-v echos version and exit" << endl ;
00060 cout << endl ;
00061 BESDebug::Help( cout ) ;
00062 exit( 0 ) ;
00063 }
00064
00065 void
00066 BESServerUtils::show_version( const string &app_name )
00067 {
00068 cout << app_name
00069 << ": " << PACKAGE_STRING << endl ;
00070 exit( 0 ) ;
00071 }
00072