482 |
printf(" %-18s = %s\n", "Use process engine", Run.doprocess?"True":"False"); |
printf(" %-18s = %s\n", "Use process engine", Run.doprocess?"True":"False"); |
483 |
printf(" %-18s = %d seconds\n", "Poll time", Run.polltime); |
printf(" %-18s = %d seconds\n", "Poll time", Run.polltime); |
484 |
printf(" %-18s = ", "Mail server(s)"); |
printf(" %-18s = ", "Mail server(s)"); |
485 |
|
|
486 |
if(Run.mailservers) { |
if(Run.mailservers) { |
487 |
MailServer_T mta= Run.mailservers; |
MailServer_T mta= Run.mailservers; |
488 |
for(mta= Run.mailservers; mta; mta= mta->next) |
for(mta= Run.mailservers; mta; mta= mta->next) |
491 |
} else { |
} else { |
492 |
printf("localhost\n"); |
printf("localhost\n"); |
493 |
} |
} |
494 |
|
|
495 |
printf(" %-18s = %s\n", "Mail from", is_str_defined(Run.MailFormat.from)); |
printf(" %-18s = %s\n", "Mail from", is_str_defined(Run.MailFormat.from)); |
496 |
printf(" %-18s = %s\n", "Mail subject", |
printf(" %-18s = %s\n", "Mail subject", |
497 |
is_str_defined(Run.MailFormat.subject)); |
is_str_defined(Run.MailFormat.subject)); |
499 |
Run.MailFormat.message? |
Run.MailFormat.message? |
500 |
Run.MailFormat.message:"(not defined)", |
Run.MailFormat.message:"(not defined)", |
501 |
Run.MailFormat.message?"..(truncated)":""); |
Run.MailFormat.message?"..(truncated)":""); |
|
|
|
|
printf(" %-18s = %s\n", "Start monit httpd", Run.dohttpd?"True":"False"); |
|
|
|
|
502 |
|
|
503 |
|
printf(" %-18s = %s\n", "Start monit httpd", Run.dohttpd?"True":"False"); |
504 |
|
|
505 |
if(Run.dohttpd) { |
if(Run.dohttpd) { |
506 |
|
|
533 |
|
|
534 |
} |
} |
535 |
|
|
536 |
|
{ |
537 |
|
Mail_T list; |
538 |
|
for(list= Run.maillist; list; list= list->next) { |
539 |
|
printf(" %-18s = %s\n", "Alert mail to", is_str_defined(list->to)); |
540 |
|
printf(" %-18s = ", "Alert on"); |
541 |
|
if(list->events == (~((unsigned int)0))) { |
542 |
|
printf("All events"); |
543 |
|
} else { |
544 |
|
if(IS_EVENT_SET(list->events, EVENT_START)) |
545 |
|
printf("Start "); |
546 |
|
if(IS_EVENT_SET(list->events, EVENT_STOP)) |
547 |
|
printf("Stop "); |
548 |
|
if(IS_EVENT_SET(list->events, EVENT_RESTART)) |
549 |
|
printf("Restart "); |
550 |
|
if(IS_EVENT_SET(list->events, EVENT_CHECKSUM)) |
551 |
|
printf("Checksum "); |
552 |
|
if(IS_EVENT_SET(list->events, EVENT_RESOURCE)) |
553 |
|
printf("Resource "); |
554 |
|
if(IS_EVENT_SET(list->events, EVENT_TIMEOUT)) |
555 |
|
printf("Timeout "); |
556 |
|
if(IS_EVENT_SET(list->events, EVENT_TIMESTAMP)) |
557 |
|
printf("Timestamp "); |
558 |
|
if(IS_EVENT_SET(list->events, EVENT_SIZE)) |
559 |
|
printf("Size "); |
560 |
|
if(IS_EVENT_SET(list->events, EVENT_CONNECTION)) |
561 |
|
printf("Connection "); |
562 |
|
if(IS_EVENT_SET(list->events, EVENT_PERMISSION)) |
563 |
|
printf("Permission "); |
564 |
|
if(IS_EVENT_SET(list->events, EVENT_UID)) |
565 |
|
printf("Uid "); |
566 |
|
if(IS_EVENT_SET(list->events, EVENT_GID)) |
567 |
|
printf("Gid "); |
568 |
|
if(IS_EVENT_SET(list->events, EVENT_UNMONITOR)) |
569 |
|
printf("Unmonitor "); |
570 |
|
} |
571 |
|
printf("\n"); |
572 |
|
} |
573 |
|
} |
574 |
|
|
575 |
printf("\n"); |
printf("\n"); |
576 |
|
|
577 |
} |
} |