Initiated update-mechanic, minor fixes
This commit is contained in:
14
run_update.php
Normal file
14
run_update.php
Normal 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";
|
||||
}
|
Reference in New Issue
Block a user