option to define SMS recipient via config

This commit is contained in:
2011-12-12 13:28:07 +04:00
parent 1d7c2b6a15
commit 849e8dc502
3 changed files with 3 additions and 3 deletions

View File

@ -16,6 +16,7 @@ cfg_t *cfg; // pointer to configuration structure
host_decl* hosts=NULL; // structure with hosts' definitions
int hosts_count=0; // count of hosts
int debug_flag=0;
char* recipient_number=NULL; // recipient of sms alerts
void log_debug(const char *message,int verbosity)
{
@ -44,6 +45,7 @@ void init()
cfg_opt_t opts[] = {
CFG_STR_LIST("hosts", "{}", CFGF_NONE),
CFG_SIMPLE_INT("debug", &debug_flag),
CFG_SIMPLE_STR("sms_recipient", &recipient_number),
CFG_END()
};
cfg = cfg_init(opts, CFGF_NONE);