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 &"); } }