You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lokinet/daemon/main.cpp

27 lines
395 B
C++

#include <llarp.h>
#include <signal.h>
#include <memory>
struct llarp_main *ctx = 0;
6 years ago
void
handle_signal(int sig)
6 years ago
{
if(ctx)
llarp_main_signal(ctx, sig);
6 years ago
}
int
main(int argc, char *argv[])
{
6 years ago
const char *conffname = "daemon.ini";
if(argc > 1)
conffname = argv[1];
if(llarp_main_init(&ctx, conffname))
{
signal(SIGINT, handle_signal);
return llarp_main_run(ctx);
}
7 years ago
}