if ($file == $running) { $filesMod[$i]["running"] = true; } $i++; } $filesMod = json_encode($filesMod); echo $filesMod; } if ($_POST["start"]) { $configFile = $_POST["start"]; startGRIP($configFile); echo "200"; } if ($_POST["stop"]) { $configFile = $_POST["stop"]; stopGRIP($configFile); echo "200"; } if ($_POST["delete"]) { $configFile = $_POST["delete"]; deleteConfig($configFile); echo "200"; } if ($_POST["addToStartup"]) { $configFile = $_POST["addToStartup"]; addToStartup($configFile); echo "200"; } if ($_POST["removeFromStartup"]) { $configFile = $_POST["removeFromStartup"]; removeFromStartup($configFile);
function removeFromStartup($configFile) { //exec(rm startup.init); writeToFile("startup", ""); stopGRIP(); }