Fix: installed immer true – Enable/Disable immer sichtbar
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>main v1.1.328
parent
1bcd93908e
commit
a9ad26757b
|
|
@ -27,10 +27,9 @@ class ClamavManager extends Component
|
|||
public function refresh(): void
|
||||
{
|
||||
$this->lastError = '';
|
||||
// serviceKnown() prüft ob systemd die Unit kennt (active, inactive, disabled → installiert)
|
||||
$this->running = $this->serviceActive();
|
||||
$this->enabled = $this->serviceEnabled();
|
||||
$this->installed = $this->running || $this->serviceKnown();
|
||||
$this->installed = true; // Mailwolt setzt ClamAV voraus; Fehler kommen vom Wrapper
|
||||
$this->ramMb = $this->running ? $this->readRamMb() : null;
|
||||
[$this->dbDate, $this->dbVersion] = $this->readDbInfo();
|
||||
}
|
||||
|
|
@ -89,16 +88,6 @@ class ClamavManager extends Component
|
|||
$this->refresh();
|
||||
}
|
||||
|
||||
private function serviceKnown(): bool
|
||||
{
|
||||
$out = [];
|
||||
@exec('systemctl list-unit-files clamav-daemon.service 2>/dev/null', $out);
|
||||
foreach ($out as $line) {
|
||||
if (str_contains($line, 'clamav-daemon')) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private function serviceActive(): bool
|
||||
{
|
||||
$exit = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue