1
0
mirror of https://github.com/GOSTSec/sgminer synced 2025-01-08 22:08:02 +00:00
sgminer/events.h
ystarnaud 81d9c9e574 Events framework
Added the ability to have users run commands, reboot the system or quit sgminer based on system events. These events can be defined and placed throughout the sgminer source. So far the events are: "gpu_sick", "gpu_dead" and "idle". I will document further shortly. Config example available here: http://pastebin.com/2rRv3EzH
2014-11-19 18:33:11 +01:00

23 lines
624 B
C

#ifndef EVENTS_H
#define EVENTS_H
typedef struct event {
unsigned int id;
const char *event_type;
const char *runcmd;
bool reboot;
unsigned int reboot_delay;
bool quit;
const char *quit_msg;
struct event *prev, *next;
} event_t;
extern char *set_event_type(const char *event_type);
extern char *set_event_runcmd(const char *cmd);
extern char *set_event_reboot(const char *arg);
extern char *set_event_reboot_delay(const char *delay);
extern char *set_event_quit(const char *arg);
extern char *set_event_quit_message(const char *msg);
extern void event_notify(const char *event_type);
#endif /* EVENTS_H */