il contatore dei consumi (ADR 2)
Codice: Seleziona tutto
nano config_daemon.php<?php
if(!defined('checkaccess')){die('Direct access not permitted');}
// Manage com. apps daemon as 'http' user if needed
if (!is_null($pid)) { // Start Daemon
$output = shell_exec('pooler485 2 9600 /dev/ttyUSB0 > /dev/null 2>/dev/null &');
//$output = shell_exec('poolSDM485 1 9600 /dev/sdm > /dev/null 2>/dev/null &');
//$output = shell_exec('/usr/bin/curl http://192.168.1.12/startsdm.php');
//$output = shell_exec("/srv/http/comapps/poolmeters.py live > /dev/null 2>&1 &");
} else { //Stop
$output = shell_exec('pkill -f pooler485 > /dev/null 2>&1');
sleep(1);
//$output = shell_exec('pkill -f poolSDM485 > /dev/null 2>&1 &');
}
?>