osquery-1/osquery/main/shell.cpp

23 lines
621 B
C++
Raw Normal View History

2014-07-31 00:35:19 +00:00
// Copyright 2004-present Facebook. All Rights Reserved.
#include "osquery/core.h"
#include "osquery/database.h"
2014-07-31 00:35:19 +00:00
#include "osquery/devtools.h"
#include "osquery/events.h"
2014-07-31 00:35:19 +00:00
int main(int argc, char *argv[]) {
2014-09-13 21:28:45 +00:00
osquery::initOsquery(argc, argv);
// Start a thread for each appropriate event type
osquery::registries::faucet(REGISTERED_EVENTPUBLISHERS,
REGISTERED_EVENTSUBSCRIBERS);
osquery::EventFactory::delay();
osquery::FLAGS_db_path = "/tmp/rocksdb-osquery-shell";
int retcode = osquery::launchIntoShell(argc, argv);
// End any event type threads.
osquery::EventFactory::end();
return retcode;
2014-07-31 00:35:19 +00:00
}