43 #define BES_CONF getenv("BES_CONF")
45 BESKeys *TheBESKeys::_instance = 0;
56 string try_ini =
"/usr/local/etc/bes/bes.conf";
58 int statret = stat(try_ini.c_str(), &buf);
59 if (statret == -1 || !S_ISREG( buf.st_mode )) {
60 try_ini =
"/etc/bes/bes.conf";
61 int statret = stat(try_ini.c_str(), &buf);
62 if (statret == -1 || !S_ISREG( buf.st_mode )) {
63 try_ini =
"/usr/etc/bes/bes.conf";
64 int statret = stat(try_ini.c_str(), &buf);
65 if (statret == -1 || !S_ISREG( buf.st_mode )) {
66 string s =
"Unable to find a conf file or module version mismatch." ;
71 "Unable to locate BES config file. " +
"Please either pass -c "
72 +
"option when starting the BES, set " +
"the environment variable BES_CONF, "
73 +
"or install in /usr/local/etc/bes/bes.conf " +
"or /etc/bes/bes.conf.";
105 void TheBESKeys::updateKeys()
107 delete _instance; _instance = 0;
111 void TheBESKeys::updateKeys(
const string &keys_file_name )
113 delete _instance; _instance = 0;