Fix: ClamAV enable() blockiert nicht mehr – shell_exec + nohup + </dev/null
exec() wartet auch mit & auf Prozessende. shell_exec mit nohup und stdin-Redirect auf /dev/null stellt echtes Hintergrund-Detaching sicher. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.333
parent
673e9ec1df
commit
68e7635f6d
|
|
@ -55,7 +55,7 @@ class ClamavManager extends Component
|
|||
{
|
||||
$this->lastError = '';
|
||||
$this->lastSuccess = '';
|
||||
@exec('sudo -n /usr/local/sbin/mailwolt-clamav enable > /tmp/mw-clamav-start.log 2>&1 &');
|
||||
@shell_exec('nohup sudo -n /usr/local/sbin/mailwolt-clamav enable </dev/null >/tmp/mw-clamav-start.log 2>&1 &');
|
||||
$this->enabled = true;
|
||||
$this->lastSuccess = 'ClamAV wird gestartet… Dies kann bis zu 60 Sekunden dauern. Klicken Sie danach auf „Aktualisieren".';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue