mirror of
https://github.com/myronblair/novacpx
synced 2026-06-30 17:50:41 -05:00
Fix nginx proxy start/stop: missing sudo, silent failures, no progress UI
- ProxyManager::sysctl() and reload() now use sudo for local commands — www-data cannot run systemctl directly, so start/stop/restart/reload were silently failing with permission denied - Control endpoint now returns success:false when nginx stays stopped after a start/restart, or stays running after a stop - proxyControl() JS shows a loading overlay while the action runs and uses error toast when the action reports failure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2733,9 +2733,13 @@ window.proxyInstall = async () => {
|
||||
};
|
||||
|
||||
window.proxyControl = async (action) => {
|
||||
Nova.loading(action.charAt(0).toUpperCase() + action.slice(1) + 'ing nginx…');
|
||||
const r = await Nova.api('proxy', 'control', { method: 'POST', body: { action } });
|
||||
Nova.toast(r?.data?.result || r?.message || action + ' done', 'success');
|
||||
setTimeout(() => Nova.loadPage('nginx-proxy', window._novaPages), 800);
|
||||
Nova.loadingDone();
|
||||
const ok = r?.success;
|
||||
const msg = r?.data?.result || r?.message || (ok ? action + ' done' : action + ' failed');
|
||||
Nova.toast(msg, ok ? 'success' : 'error');
|
||||
Nova.loadPage('nginx-proxy', window._novaPages);
|
||||
};
|
||||
|
||||
window.proxySync = async () => {
|
||||
|
||||
Reference in New Issue
Block a user