This commit is contained in:
Your Name
2025-06-30 15:37:24 +01:00
parent acdc736a38
commit 3b8b51172c
2 changed files with 146 additions and 1 deletions

View File

@@ -255,6 +255,20 @@ if ($type == "git_pull") {
echo $output;
}
if ($type == "update_firmware") {
// Execute the comprehensive update script
$command = 'sudo /var/www/moduleair_pro_4g/update_firmware.sh 2>&1';
$output = shell_exec($command);
// Return the output as JSON for better web display
header('Content-Type: application/json');
echo json_encode([
'success' => true,
'output' => $output,
'timestamp' => date('Y-m-d H:i:s')
]);
}
if ($type == "set_RTC_withNTP") {
$command = 'sudo /usr/bin/python3 /var/www/moduleair_pro_4g/RTC/set_with_NTP.py';
$output = shell_exec($command);