From 70ac37a4677844bf2a7f182bb91587466cbb6d44 Mon Sep 17 00:00:00 2001 From: Javan Rasokat <4342160+JavanXD@users.noreply.github.com> Date: Fri, 8 Mar 2024 14:37:57 +0100 Subject: [PATCH] changed to wittypiutilities.py --- backend/settings.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/backend/settings.php b/backend/settings.php index 8608440..22329f9 100644 --- a/backend/settings.php +++ b/backend/settings.php @@ -106,7 +106,8 @@ function clean($string) { file_put_contents($wittyPiFile, $postJson["wittyPi"]["normal"]["schedule"]); // set WittyPi (dont wait exec to finish) - shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 1 $wittyPi_version > /dev/null 2>&1 &"); + //shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 1 $wittyPi_version > /dev/null 2>&1 &"); + shell_exec("sudo sh ".$GLOBALS['scriptsFolder']."/wittypiutilities.py 1 > /dev/null 2>&1 &"); } else { // clear schedule.wpi @@ -114,16 +115,19 @@ function clean($string) { $postJson["wittyPi"]["normal"]["enabled"] = false; // reset wittyPi schedule - shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 0 $wittyPi_version > /dev/null 2>&1 &"); + //shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 0 $wittyPi_version > /dev/null 2>&1 &"); + shell_exec("sudo sh ".$GLOBALS['scriptsFolder']."/wittypiutilities.py 0 2>&1 &"); } // set WittyPi dummyload if ($postJson["wittyPi"]["enabled"] == true && isset($postJson["wittyPi"]["version"]) && isset($postJson["wittyPi"]["dummyload"]) && $postJson["wittyPi"]["version"] >= 3) { if ((INT)$postJson["wittyPi"]["dummyload"] > 0) { $dummyload = (INT)$postJson["wittyPi"]["dummyload"]; - shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 2 $wittyPi_version $dummyload > /dev/null 2>&1 &"); + //shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 2 $wittyPi_version $dummyload > /dev/null 2>&1 &"); + shell_exec("sudo sh ".$GLOBALS['scriptsFolder']."/wittypiutilities.py 2 > /dev/null 2>&1 &"); } else { - shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 3 $wittyPi_version > /dev/null 2>&1 &"); + //shell_exec("sudo sh ".$GLOBALS['shellDir']."/change_wittypi.sh 3 $wittyPi_version > /dev/null 2>&1 &"); + shell_exec("sudo sh ".$GLOBALS['scriptsFolder']."/wittypiutilities.py 2 > /dev/null 2>&1 &"); } }