Commit 410ed4fe authored by Carrie A Brown's avatar Carrie A Brown
Browse files

Update setLEDs.php

parent 846371ad
......@@ -10,58 +10,53 @@
$file = fopen($filename, "a");
fwrite($file, $_COOKIE[$cookie_name]);
fclose($file);
if ($_COOKIE[$job_name] == "start"){
for ($x=1; $x<=8;$x++){
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey worker".(string)$x." 'screen -md python /work/LightPi.py'\"");}
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.1 'screen -md python /work/idleControl.py'\"");
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.5 'screen -md python /work/idleControl.py'\"");
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.6 'screen -md python /work/idleNet.py'\"");
if ($_COOKIE[$job_name] == "start"){
for ($x=1; $x<=8;$x++){
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey worker".(string)$x." 'screen -md python /work/LightPi.py'\"");}
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.1 'screen -md python /work/idleControl.py'\"");
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.5 'screen -md python /work/idleControl.py'\"");
exec("sudo -H -u pi bash -c \"ssh -i ~pi/LegionKey 192.168.1.6 'screen -md python /work/idleNet.py'\"");
}
if ($_COOKIE[$job_name] == "HPC"){
$random = (string)rand(5,30);
exec("cd /work/; sudo -H -u pi bash -c \"python /work/HPCWeb.py\"");
exec("cd /work/; sudo -H -u pi bash -c \"python /work/HPCWeb.py\"");
}
if ($_COOKIE[$job_name] == "HTC"){
exec("cd /work/; sudo -H -u pi bash -c \"python /work/HTCWeb.py\"" );
exec("cd /work/; sudo -H -u pi bash -c \"python /work/HTCWeb.py\"" );
}
if ($_COOKIE[$job_name] == "ION"){
exec("sudo -H -u pi bash -c \"bash /work/idleOn.sh\"");
exec("sudo -H -u pi bash -c \"bash /work/idleOn.sh\"");
}
if ($_COOKIE[$job_name] == "IOFF"){
exec("sudo -H -u pi bash -c \"bash /work/idleOff.sh\"");
exec("sudo -H -u pi bash -c \"bash /work/idleOff.sh\"");
}
?>
<!-- "Debugging" display message -->
<body style="background-color:#FFFFFF">
<table style="width: 100%" border="1">
<tbody>
<tr>
<tr><b>Sending Data...</b></tr>
Cookie Value: "<?php echo $_COOKIE[$cookie_name];?>"
<br><tr>
</tr>
</tr>
</tbody>
<tbody>
<tr>
<tr><b>Sending Data...</b></tr>
Cookie Value: "<?php echo $_COOKIE[$cookie_name];?>"
<br><tr></tr>
</tr>
</tbody>
</table>
<p><br>
</p>
</body>
<p><br></p>
</body>
</html>
<script>
document.addEventListener("DOMContentLoaded", function(event) {
window.location.replace("index.php");
window.location.replace("index.php");
});
</script>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment