Add domain to the config
This commit is contained in:
@ -7,7 +7,7 @@
|
|||||||
# emailServerAddress=
|
# emailServerAddress=
|
||||||
# sslCrtPath=
|
# sslCrtPath=
|
||||||
# sslKeyPath=
|
# sslKeyPath=
|
||||||
|
# domain=
|
||||||
|
|
||||||
# Optional: {default}
|
# Optional: {default}
|
||||||
# emailServerPort={587}
|
# emailServerPort={587}
|
||||||
@ -32,5 +32,6 @@ sslCrtPath=/media/sf_cavecommRemote/example.crt;
|
|||||||
|
|
||||||
sslKeyPath=/media/sf_cavecommRemote/example.key;
|
sslKeyPath=/media/sf_cavecommRemote/example.key;
|
||||||
|
|
||||||
|
domain=192.168.56.1:18080;
|
||||||
|
|
||||||
#configend#
|
#configend#
|
||||||
|
@ -7,10 +7,11 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <pqxx/pqxx>
|
#include <pqxx/pqxx>
|
||||||
|
#include <openssl/sha.h>
|
||||||
#include "crow.h"
|
#include "crow.h"
|
||||||
#include "cpp/opportunisticsecuresmtpclient.hpp"
|
#include "cpp/opportunisticsecuresmtpclient.hpp"
|
||||||
#include "cpp/htmlmessage.hpp"
|
#include "cpp/htmlmessage.hpp"
|
||||||
#include <openssl/sha.h>
|
#include "emailTemplateCollection.cpp"
|
||||||
|
|
||||||
using namespace jed_utils::cpp;
|
using namespace jed_utils::cpp;
|
||||||
|
|
||||||
@ -56,6 +57,7 @@ namespace Utilities {
|
|||||||
std::string emailAddressDisplay = "Cavecomm Automated Management System";
|
std::string emailAddressDisplay = "Cavecomm Automated Management System";
|
||||||
std::string sslCrtPath;
|
std::string sslCrtPath;
|
||||||
std::string sslKeyPath;
|
std::string sslKeyPath;
|
||||||
|
std::string domain;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* validates existence of mandatory variables in config
|
* validates existence of mandatory variables in config
|
||||||
@ -68,7 +70,8 @@ namespace Utilities {
|
|||||||
|| emailServerAddress.empty()
|
|| emailServerAddress.empty()
|
||||||
|| databaseConnectionString.empty()
|
|| databaseConnectionString.empty()
|
||||||
|| sslCrtPath.empty()
|
|| sslCrtPath.empty()
|
||||||
|| sslCrtPath.empty()
|
|| sslKeyPath.empty()
|
||||||
|
|| domain.empty()
|
||||||
)
|
)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -151,6 +154,10 @@ namespace Utilities {
|
|||||||
sslKeyPath = trimFromDelimiter(lineVector.at(1), ';');
|
sslKeyPath = trimFromDelimiter(lineVector.at(1), ';');
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (lineVector.at(0) == "domain") {
|
||||||
|
domain = trimFromDelimiter(lineVector.at(1), ';');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user