diff --git a/README.md b/README.md index 64735dd..a509f39 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,7 @@ I could add some padding to each packet to make it look pseudo-HTTP-like, howeve | LAIKA_PRIVKEY | Sets CNC's private key | -DLAIKA_PRIVKEY=1dbd33962f1e170d1e745c6d3e19175049b5616822fac2fa3535d7477957a841 | | LAIKA_CNC_IP | Sets CNC's public ip | -DLAIKA_CNC_IP=127.0.0.1 | | LAIKA_CNC_PORT | Sets CNC's bind()'d port | -DLAIKA_CNC_PORT=13337 | +| LAIKA_PERSISTENCE | Enables persistence for LaikaBot | -DLAIKA_PERSISTENCE=On | > examples are passed to `cmake -B ` ## Configuration and compilation diff --git a/bot/include/persist.h b/bot/include/persist.h index 4b8070d..161fc24 100644 --- a/bot/include/persist.h +++ b/bot/include/persist.h @@ -1,8 +1,11 @@ #ifndef LAIKA_PERSIST_H #define LAIKA_PERSIST_H -/* undefine to enable persistence */ +#include "lconfig.h" + +#ifndef LAIKA_PERSISTENCE #define LAIKA_NOINSTALL +#endif #include diff --git a/lib/include/lconfig.h.in b/lib/include/lconfig.h.in index 09d0caf..4c962ce 100644 --- a/lib/include/lconfig.h.in +++ b/lib/include/lconfig.h.in @@ -12,4 +12,7 @@ #define LAIKA_CNC_IP "@LAIKA_CNC_IP@" #define LAIKA_CNC_PORT "@LAIKA_CNC_PORT@" +/* settings */ +#cmakedefine LAIKA_PERSISTENCE + #endif \ No newline at end of file