brewco/brewco.c

changeset 465
3aac3276689d
parent 464
4a624c071ca9
child 466
49a5318256f0
equal deleted inserted replaced
464:4a624c071ca9 465:3aac3276689d
280 slcdCharDef(slcdHandle, 4, RevPumpONOFF); 280 slcdCharDef(slcdHandle, 4, RevPumpONOFF);
281 slcdCharDef(slcdHandle, 5, HeatONOFF); 281 slcdCharDef(slcdHandle, 5, HeatONOFF);
282 slcdCharDef(slcdHandle, 6, RevHeatONOFF); 282 slcdCharDef(slcdHandle, 6, RevHeatONOFF);
283 slcdCharDef(slcdHandle, 7, Language); 283 slcdCharDef(slcdHandle, 7, Language);
284 284
285 // if (lockprog((char *)"brewco")) { 285 if (lockprog((char *)"brewco")) {
286 // syslog(LOG_NOTICE, "Can't lock"); 286 syslog(LOG_NOTICE, "Can't lock");
287 // return 1; 287 return 1;
288 // } 288 }
289 289
290 if (debug) 290 if (debug)
291 fprintf(stdout, "Begin server()\n"); 291 fprintf(stdout, "Begin server()\n");
292 292
293 if ((rc = devices_detect())) { 293 if ((rc = devices_detect())) {
556 sock = -1; 556 sock = -1;
557 } 557 }
558 wrrecipes(); 558 wrrecipes();
559 wrconfig(); 559 wrconfig();
560 560
561 // ulockprog((char *)"brewco"); 561 ulockprog((char *)"brewco");
562 return 0; 562 return 0;
563 } 563 }
564 564
565 565
566 566
607 etcpath = xstrcpy(homepath); 607 etcpath = xstrcpy(homepath);
608 etcpath = xstrcat(etcpath, (char *)"/.brewco/etc/"); 608 etcpath = xstrcat(etcpath, (char *)"/.brewco/etc/");
609 mkdirs(varpath, 0755); 609 mkdirs(varpath, 0755);
610 mkdirs(etcpath, 0755); 610 mkdirs(etcpath, 0755);
611 611
612 fprintf(stdout, "home: %s etc=%s var=%s\n", homepath, etcpath, varpath);
613 if (rdconfig()) { 612 if (rdconfig()) {
614 fprintf(stderr, "Error reading configuration\n"); 613 fprintf(stderr, "Error reading configuration\n");
615 syslog(LOG_NOTICE, "Error reading configuration: halted"); 614 syslog(LOG_NOTICE, "Error reading configuration: halted");
616 return 1; 615 return 1;
617 } 616 }

mercurial