45 BESKeys *TheBESKeys::_instance = 0;
54 char *ini_file = BES_CONF;
57 string try_ini =
"/usr/local/etc/bes/bes.conf";
59 int statret = stat(try_ini.c_str(), &buf);
60 if (statret == -1 || !S_ISREG( buf.st_mode )) {
61 try_ini =
"/etc/bes/bes.conf";
62 int statret = stat(try_ini.c_str(), &buf);
63 if (statret == -1 || !S_ISREG( buf.st_mode )) {
64 try_ini =
"/usr/etc/bes/bes.conf";
65 int statret = stat(try_ini.c_str(), &buf);
66 if (statret == -1 || !S_ISREG( buf.st_mode )) {
67 string s =
"Unable to find a conf file or module version mismatch.";
72 "Unable to locate BES config file. " +
"Please either pass -c "
73 +
"option when starting the BES, set " +
"the environment variable BES_CONF, "
74 +
"or install in /usr/local/etc/bes/bes.conf " +
"or /etc/bes/bes.conf.";
106 void TheBESKeys::updateKeys()
108 delete _instance; _instance = 0;
112 void TheBESKeys::updateKeys(
const string &keys_file_name )
114 delete _instance; _instance = 0;
exception thrown if an internal error is found and is fatal to the BES
TheBESKeys(const string &keys_file_name)
mapping of key/value pairs defining different behaviors of an application.
static BESKeys * TheKeys()