48 |
#include <sys/stat.h> |
#include <sys/stat.h> |
49 |
#endif |
#endif |
50 |
|
|
51 |
|
#include "event.h" |
52 |
#include "alert.h" |
#include "alert.h" |
53 |
#include "monitor.h" |
#include "monitor.h" |
54 |
#include "engine.h" |
#include "engine.h" |
201 |
|
|
202 |
/* |
/* |
203 |
* Send an exec failed alert mail to those mail objects that has |
* Send an exec failed alert mail to those mail objects that has |
204 |
* registred interest for restart notification. |
* registred interest for start/restart/stop notification. |
205 |
*/ |
*/ |
206 |
static void exec_alert_mail(Service_T s, Command_T c) { |
static void exec_alert_mail(Service_T s, Command_T c) { |
207 |
|
|
208 |
Mail_T a= s->maillist; |
Mail_T a= s->maillist; |
209 |
|
|
210 |
for(; a; a= a->next) |
for(; a; a= a->next) |
211 |
if(a->alerts.alert_on_restart) { |
if(IS_EVENT_SET(a->events, EVENT_RESTART) || |
212 |
|
IS_EVENT_SET(a->events, EVENT_START) || |
213 |
|
IS_EVENT_SET(a->events, EVENT_STOP)) { |
214 |
struct mymail m; |
struct mymail m; |
215 |
char message[STRLEN]; |
char message[STRLEN]; |
216 |
|
|