239 char buf[1024]; |
239 char buf[1024]; |
240 w1_therm *tmp1, *old1; |
240 w1_therm *tmp1, *old1; |
241 rc_switch *tmp2, *old2; |
241 rc_switch *tmp2, *old2; |
242 int rc, run = 0, temp; |
242 int rc, run = 0, temp; |
243 |
243 |
|
244 if (lockprog((char *)"coolers")) { |
|
245 syslog(LOG_NOTICE, "Can't lock"); |
|
246 return 1; |
|
247 } |
|
248 |
244 my_mosquitto_init(); |
249 my_mosquitto_init(); |
245 |
250 |
246 rc = piThreadCreate(my_sensors_loop); |
251 rc = piThreadCreate(my_sensors_loop); |
247 if (rc) { |
252 if (rc) { |
248 fprintf(stderr, "my_sensors_loop thread didn't start rc=%d\n", rc); |
253 fprintf(stderr, "my_sensors_loop thread didn't start rc=%d\n", rc); |