Umbau der Statistik Ausgabe (each enfernt)

Optimierungen
This commit is contained in:
Gregor Schulte
2021-11-29 15:23:19 +01:00
parent b303dd00d6
commit c464f9e3a3
18 changed files with 580 additions and 545 deletions

View File

@@ -1,6 +1,6 @@
<?php
if (PHP_SAPI != 'cli') exit();
define('PICONTROL', true);
const PICONTROL = true;
$doNotCheckForAuthentification = true;
(include_once realpath(dirname(__FILE__)).'/../init.php') or die('Error: 0x0000');
@@ -13,4 +13,3 @@ $log->setFile(LOG_PATH.'statistic/coretemp.csv');
$log->setLimit(2016);
$log->add(array(time(), rpi_getCoreTemprature()));
$log->close();
?>

View File

@@ -1,6 +1,6 @@
<?php
if (PHP_SAPI != 'cli') exit();
define('PICONTROL', true);
const PICONTROL = true;
$doNotCheckForAuthentification = true;
(include_once realpath(dirname(__FILE__)).'/../init.php') or die('Error: 0x0000');
@@ -22,7 +22,7 @@ foreach ($fileArray as $file)
{
$timeOfFile = str_replace('-', '', substr($file, 0, 2));
$rest = date('i', time()) % $timeOfFile;
if (is_numeric($rest) && $rest == 0)
{
exec('/usr/bin/php -f "'.CRON_PATH.$file.'"');
@@ -31,6 +31,5 @@ foreach ($fileArray as $file)
}
}
if (trim(exec('dpkg -s php5-cli | grep Status: ')) != '' || trim(exec('dpkg -s php7.0-cli | grep Status: ')) || trim(exec('dpkg -s php7.3-cli | grep Status: ')) != '')
if (trim(exec('dpkg -s php7.0-cli | grep Status: ')) != '' || trim(exec('dpkg -s php7.3-cli | grep Status: ')) != '')
setConfig('cron:execution.cron', time());
?>