3 $cfgfile = __DIR__ . '/config.php';
4 if (!file_exists($cfgfile)) {
5 echo "Copy config.php.dist to config.php and adjust it\n";
11 foreach ($names as $id => $name) {
12 $data[$id]['name'] = $name;
13 foreach (array('humidity', 'temperature') as $item) {
16 array('{item}', '{id}'),
22 throw new Exception(rrd_error());
25 $data[$id][$item] = reset($lu['data']);
29 foreach (glob(__DIR__ . '/templates/*.php') as $tplfile) {
30 $outfile = $outdir . basename($tplfile, '.php');
33 $content = ob_get_contents();
35 file_put_contents($outfile, $content);