2 $cfgfile = __DIR__ . '/config.php';
3 if (!file_exists($cfgfile)) {
4 echo "Copy config.php.dist to config.php and adjust it\n";
10 foreach ($names as $id => $name) {
11 $data[$id]['name'] = $name;
12 foreach (array('humidity', 'temperature') as $item) {
15 array('{item}', '{id}'),
21 throw new Exception(rrd_error());
24 $data[$id][$item] = reset($lu['data']);
28 foreach (glob(__DIR__ . '/templates/*.php') as $tplfile) {
29 $outfile = $outdir . basename($tplfile, '.php');
32 $content = ob_get_contents();
34 file_put_contents($outfile, $content);