Add Screen control features: Screen tab in sidebar, Kivy script, and backend logic
This commit is contained in:
@@ -1751,3 +1751,17 @@ if ($type == "set_cpu_power_mode") {
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == "screen_control") {
|
||||
$action = $_GET['action'];
|
||||
if ($action == "start") {
|
||||
// Run as background process
|
||||
$command = 'export DISPLAY=:0 && nohup /usr/bin/python3 /home/aircarto/nebuleair_pro_4g/screen_control/screen.py > /dev/null 2>&1 &';
|
||||
shell_exec($command);
|
||||
echo "Started";
|
||||
} elseif ($action == "stop") {
|
||||
$command = 'sudo pkill -f "screen_control/screen.py"';
|
||||
shell_exec($command);
|
||||
echo "Stopped";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user