mirror of
https://github.com/myronblair/novacpx
synced 2026-06-30 17:50:41 -05:00
Fix uninstall not resetting to setup screen
- proxy.php: always set proxy_mode=disabled and clear remote_host/backend_ip on any uninstall, not just when nginx binary is removed - admin.js: show setup cards when mode==='disabled' regardless of whether nginx binary still exists on the remote VM - Status card shows 'Disabled' instead of 'Stopped' when mode is disabled Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -200,10 +200,9 @@ try {
|
||||
$action === 'uninstall' && $method === 'DELETE' => (function() use ($body) {
|
||||
$removeNginx = !empty($body['remove_nginx']);
|
||||
$result = ProxyManager::uninstall($removeNginx);
|
||||
if ($removeNginx) {
|
||||
$db = DB::getInstance();
|
||||
$db->execute("INSERT INTO settings (`key`, value) VALUES ('proxy_mode','disabled') ON DUPLICATE KEY UPDATE value='disabled'");
|
||||
}
|
||||
// Always reset to disabled — configs are gone regardless of whether nginx binary was removed
|
||||
$db = DB::getInstance();
|
||||
$db->execute("INSERT INTO settings (`key`, value) VALUES ('proxy_mode','disabled'),('proxy_remote_host',''),('proxy_backend_ip','') ON DUPLICATE KEY UPDATE value=VALUES(value)");
|
||||
Response::json(['success' => true, 'data' => ['result' => $result]]);
|
||||
})(),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user