enable and start iprefresher service automatically after package installation (#18)
- dont terminate service if config not valid.
This commit is contained in:
committed by
GitHub
parent
826386e849
commit
da53941cba
@ -54,14 +54,15 @@ IPRefresher::IPRefresher(bool loop) {
|
||||
if (loop) {
|
||||
Logger::message("startup of service");
|
||||
Logger::message("Version: " + Version::VERSION);
|
||||
if (Config::readConfig()) {
|
||||
while (true) {
|
||||
Logger::message("starting check");
|
||||
|
||||
while (true) {
|
||||
Logger::message("starting check");
|
||||
if (Config::readConfig()) {
|
||||
checkIPAdress(false);
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(300000));
|
||||
} else {
|
||||
std::cout << "incorrect credentials!" << std::endl;
|
||||
}
|
||||
} else {
|
||||
std::cout << "incorrect credentials!" << std::endl;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(300000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user