diff --git a/server/src/client/command_handler/misc.cpp b/server/src/client/command_handler/misc.cpp index ecca6e2..0293468 100644 --- a/server/src/client/command_handler/misc.cpp +++ b/server/src/client/command_handler/misc.cpp @@ -1904,9 +1904,9 @@ command_result ConnectedClient::handleCommandLogView(ts::Command& cmd) { index += 2; } } - string command = "cat \"" + log_path + "\""; + string command = "bash -c 'cat \"" + log_path + "\""; command += " | grep -E "; - command += R"("\] \[.*\]( ){0,6}?)" + server_identifier + " \\|\""; + command += R"("\] \[.*\]( ){0,6}?)" + server_identifier + " \\|\"'"; size_t beginpos = cmd[0].has("begin_pos") ? cmd["begin_pos"].as() : 0ULL; //TODO test it? size_t file_index = 0; diff --git a/server/src/lincense/LicenseService.cpp b/server/src/lincense/LicenseService.cpp index 2c19f60..3028547 100644 --- a/server/src/lincense/LicenseService.cpp +++ b/server/src/lincense/LicenseService.cpp @@ -184,7 +184,13 @@ void LicenseService::handle_check_fail(const std::string &error) { std::lock_guard rlock{this->request_lock}; this->abort_request(rlock, "request failed"); - if(config::license->isPremium() && (this->timings.last_succeeded.time_since_epoch().count() == 0 || this->timings.failed_count < 6)) { + //1 + 5*4 + 5*10+20*30 + //1 + 5*4 + 5*10+70*30 + auto soft_license_check = config::license->isValid() && ( + this->timings.last_succeeded.time_since_epoch().count() == 0 ? this->timings.failed_count < 32 : /* About 12hours */ + this->timings.failed_count < 82 /* about 36 hours */ + ); + if(config::license->isPremium() && !soft_license_check) { logCritical(LOG_INSTANCE, strobf("Failed to validate license:").string()); logCritical(LOG_INSTANCE, error); logCritical(LOG_INSTANCE, strobf("Stopping server!").string());