* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Jeedom. If not, see <http://www.gnu.org/licenses/>. */ try { require_once dirname(__FILE__) . '/../../../../core/php/core.inc.php'; include_file('core', 'authentification', 'php'); include_file('core', 'pin', 'config', 'arduidom'); if (!isConnect('admin')) { throw new Exception(__('401 - Accès non autorisé', __FILE__)); } for ($i = 1; $i < 9; $i++) { if (init('action') == 'restartDaemon' . $i) { arduidom::restartdaemon($i); if (arduidom::checkdaemon($i) == 1) { ajax::success(); } else { ajax::error("Le démon " . $i . " n'a pas démarré"); } } if (init('action') == 'stopDaemon' . $i) { arduidom::stopdaemon($i); if (arduidom::checkdaemon($i) == 0) { ajax::success(); } else { ajax::error("Le démon " . $i . " ne s'est pas arreté"); } } if (init('action') == 'checkDaemon' . $i) {