Files
THOS-Server/run_update.php

15 lines
457 B
PHP
Raw Normal View History

2025-06-20 18:06:57 +02:00
<?php
$mode = $_GET['mode'] ?? 'git'; // Future-proof!
if ($mode === 'git') {
$output = shell_exec("git -C /usr/thos pull 2>&1");
echo "✅ Git update applied:\n$output";
} elseif ($mode === 'curl') {
// Placeholder for future upgrade logic
$output = shell_exec("curl -s https://your.url/thos-update.sh | sudo bash 2>&1");
echo "🔧 Installer run:\n$output";
} else {
http_response_code(400);
echo "❌ Unknown update mode";
}