fix config

This commit is contained in:
staging new 2021-05-13 14:38:30 +02:00
parent 3df94ee88b
commit b4481c1f4e
2 changed files with 10 additions and 9 deletions

View File

@ -167,11 +167,12 @@ int Gradido_LoginServer::main(const std::vector<std::string>& args)
// *************** load from config ******************************************** // *************** load from config ********************************************
std::string cfg_Path = Poco::Path::config() + "grd_login/"; std::string cfg_Path = Poco::Path::config() + "grd_login/";
if (mConfigPath != "") {
cfg_Path = mConfigPath;
}
try { try {
loadConfiguration(cfg_Path + "grd_login.properties"); if(mConfigPath != "") {
loadConfiguration(mConfigPath);
} else {
loadConfiguration(cfg_Path + "grd_login.properties");
}
} }
catch (Poco::Exception& ex) { catch (Poco::Exception& ex) {
errorLog.error("error loading config: %s", ex.displayText()); errorLog.error("error loading config: %s", ex.displayText());
@ -298,4 +299,4 @@ int Gradido_LoginServer::main(const std::vector<std::string>& args)
} }
return Application::EXIT_OK; return Application::EXIT_OK;
} }

View File

@ -3,12 +3,12 @@ COLOR_GREEN="\033[0;32m"
COLOR_YELLOW="\e[33m" COLOR_YELLOW="\e[33m"
COLOR_NONE="\033[0m" COLOR_NONE="\033[0m"
LOGIN_DB_USER=gradido_login LOGIN_DB_USER=gradido_login_live
LOGIN_DB_NAME=gradido_login LOGIN_DB_NAME=gradido_login_live
LOGIN_DB_PASSWD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo); LOGIN_DB_PASSWD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo);
COMMUNITY_DB_USER=gradido_community COMMUNITY_DB_USER=gradido_community_live
COMMUNITY_DB_NAME=gradido_community COMMUNITY_DB_NAME=gradido_community_live
COMMUNITY_DB_PASSWD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo); COMMUNITY_DB_PASSWD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32};echo);
# create table # create table