Added kill switch. (#25)

This commit is contained in:
Ravin Perera
2021-07-09 12:19:59 +05:30
committed by GitHub
parent e7f64861f9
commit 82ba515cbd
6 changed files with 100 additions and 0 deletions

View File

@@ -10,6 +10,8 @@
#include "crypto.hpp"
#include "hp_manager.hpp"
#include "version.hpp"
#include "util/util.hpp"
#include "killswitch/killswitch.h"
#define PARSE_ERROR \
{ \
@@ -139,6 +141,12 @@ int main(int argc, char **argv)
}
else if (conf::ctx.command == "run")
{
if (kill_switch(util::get_epoch_milliseconds()))
{
std::cerr << "Sashimono Agent usage limit failure.\n";
return -1;
}
if (conf::init() != 0)
return -1;