Initiated update-mechanic, minor fixes

This commit is contained in:
2025-06-20 18:06:57 +02:00
parent caa4142aa7
commit 2ac79b66db
6 changed files with 978 additions and 868 deletions

14
run_update.php Normal file
View File

@ -0,0 +1,14 @@
<?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";
}