166 openlog("thermometers", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_USER); |
166 openlog("thermometers", LOG_PID|LOG_CONS|LOG_NOWAIT, LOG_USER); |
167 syslog(LOG_NOTICE, "mbsePi-apps thermometers v%s starting", VERSION); |
167 syslog(LOG_NOTICE, "mbsePi-apps thermometers v%s starting", VERSION); |
168 if (debug) |
168 if (debug) |
169 fprintf(stdout, "mbsePi-apps thermometers v%s starting\n", VERSION); |
169 fprintf(stdout, "mbsePi-apps thermometers v%s starting\n", VERSION); |
170 |
170 |
171 if (rdconfig()) { |
171 if (rdconfig((char *)"thermometers.conf")) { |
172 fprintf(stderr, "Error reading configuration\n"); |
172 fprintf(stderr, "Error reading configuration\n"); |
173 syslog(LOG_NOTICE, "halted"); |
173 syslog(LOG_NOTICE, "halted"); |
174 return 1; |
174 return 1; |
175 } |
175 } |
176 |
176 |