160 |
|
|
161 |
/* Private prototypes */ |
/* Private prototypes */ |
162 |
static void initialize(); |
static void initialize(); |
163 |
|
static void postparse(); |
164 |
static void addservice(Service_T); |
static void addservice(Service_T); |
165 |
static void addmail(char *, Mail_T, unsigned int); |
static void addmail(char *, Mail_T, unsigned int); |
166 |
static void createservice(int, char *, char *); |
static void createservice(int, char *, char *); |
918 |
|
|
919 |
} |
} |
920 |
|
|
|
/* Check the sanity of any dependency graph */ |
|
|
check_depend(); |
|
921 |
END_LOCK; |
END_LOCK; |
922 |
|
|
923 |
|
postparse(); |
924 |
|
|
925 |
return(cfg_errflag == 0); |
return(cfg_errflag == 0); |
926 |
|
|
937 |
*/ |
*/ |
938 |
static void initialize() { |
static void initialize() { |
939 |
|
|
940 |
destroy_hosts_allow(); |
destroy_hosts_allow(); |
941 |
Run.dolog= FALSE; |
Run.dolog= FALSE; |
942 |
Run.dohttpd= FALSE; |
Run.dohttpd= FALSE; |
943 |
Run.Auth.defined= FALSE; |
Run.Auth.defined= FALSE; |
954 |
} |
} |
955 |
|
|
956 |
|
|
957 |
|
/* |
958 |
|
* Check that values are reasonable after parsing |
959 |
|
*/ |
960 |
|
static void postparse() { |
961 |
|
|
962 |
|
if(cfg_errflag) { |
963 |
|
return; |
964 |
|
} |
965 |
|
|
966 |
|
/* Check the sanity of any dependency graph */ |
967 |
|
check_depend(); |
968 |
|
|
969 |
|
/* Check that we do not start monit in daemon mode without having a |
970 |
|
* poll time */ |
971 |
|
if(!Run.polltime && (Run.isdaemon || Run.init)) { |
972 |
|
log("%s: Error, poll time not defined! Please define poll time in\n" |
973 |
|
"the control file or use the -d option when starting monit\n", prog); |
974 |
|
cfg_errflag++; |
975 |
|
} |
976 |
|
|
977 |
|
} |
978 |
|
|
979 |
|
|
980 |
/* |
/* |
981 |
* Create a new service object and add any current objects to the |
* Create a new service object and add any current objects to the |
982 |
* service list. |
* service list. |