67 |
#include "md5.h" |
#include "md5.h" |
68 |
#include "sha.h" |
#include "sha.h" |
69 |
#include "state.h" |
#include "state.h" |
70 |
|
#include "event.h" |
71 |
|
|
72 |
|
|
73 |
/** |
/** |
332 |
if(can_http()) |
if(can_http()) |
333 |
monit_http(START_HTTP); |
monit_http(START_HTTP); |
334 |
|
|
335 |
|
/* send the monit startup notification */ |
336 |
|
Event_post(Run.system, EVENT_INSTANCE, STATE_FAILED, |
337 |
|
Run.system->action_MONIT_RELOAD, "Monit reloaded"); |
338 |
|
|
339 |
} |
} |
340 |
|
|
341 |
|
|
421 |
|
|
422 |
log("%s daemon with pid [%d] killed\n", prog, (int)getpid()); |
log("%s daemon with pid [%d] killed\n", prog, (int)getpid()); |
423 |
|
|
424 |
|
/* send the monit stop notification */ |
425 |
|
Event_post(Run.system, EVENT_INSTANCE, STATE_FAILED, |
426 |
|
Run.system->action_MONIT_STOP, "Monit stopped"); |
427 |
|
|
428 |
} |
} |
429 |
|
|
430 |
/* wait for all wait_start threads to finish */ |
/* wait for all wait_start threads to finish */ |
474 |
if(can_http()) |
if(can_http()) |
475 |
monit_http(START_HTTP); |
monit_http(START_HTTP); |
476 |
|
|
477 |
|
/* send the monit startup notification */ |
478 |
|
Event_post(Run.system, EVENT_INSTANCE, STATE_FAILED, |
479 |
|
Run.system->action_MONIT_START, "Monit started"); |
480 |
|
|
481 |
for(;;) { |
for(;;) { |
482 |
|
|
483 |
validate(); |
validate(); |
485 |
sleep(Run.polltime); |
sleep(Run.polltime); |
486 |
|
|
487 |
if(Run.doreload) |
if(Run.doreload) |
488 |
do_reinit(); |
do_reinit(); |
489 |
|
|
490 |
if(Run.stopped) |
if(Run.stopped) |
491 |
do_exit(); |
do_exit(); |
492 |
|
|
493 |
} |
} |
494 |
|
|