mirror of
https://github.com/myronblair/novacpx
synced 2026-06-30 17:50:41 -05:00
Fix remote nginx always showing Stopped — SSH warning poisoned isRunning()
remoteExec uses 2>&1 so SSH's own stderr merged with command stdout. The 'Warning: Permanently added...' line prepended to 'active' made the === 'active' check in isRunning() always return false. Add -o LogLevel=ERROR to suppress SSH informational/warning messages while keeping actual remote command output and real SSH errors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,7 +80,7 @@ class ProxyManager {
|
||||
if (!$r['host']) return 'no remote host configured';
|
||||
return shell_exec(
|
||||
'sshpass -p ' . escapeshellarg($r['pass']) .
|
||||
' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 ' .
|
||||
' ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ConnectTimeout=5 -o LogLevel=ERROR ' .
|
||||
escapeshellarg($r['user'] . '@' . $r['host']) . ' ' .
|
||||
escapeshellarg($cmd) . ' 2>&1'
|
||||
) ?? '';
|
||||
|
||||
Reference in New Issue
Block a user