Using for logview command bash
This commit is contained in:
parent
7e82f4c8ea
commit
f48fa94b82
@ -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<size_t>() : 0ULL; //TODO test it?
|
||||
size_t file_index = 0;
|
||||
|
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user