diff --git a/app/Livewire/Ui/Security/ClamavManager.php b/app/Livewire/Ui/Security/ClamavManager.php index d614dae..01547f8 100644 --- a/app/Livewire/Ui/Security/ClamavManager.php +++ b/app/Livewire/Ui/Security/ClamavManager.php @@ -52,7 +52,7 @@ class ClamavManager extends Component $this->lastSuccess = ''; $this->running = $this->serviceActive(); $this->enabled = $this->serviceEnabled(); - $this->installed = true; + $this->installed = $this->isInstalled(); $this->ramMb = $this->running ? $this->readRamMb() : null; [$this->dbDate, $this->dbVersion] = $this->readDbInfo(); } @@ -128,6 +128,13 @@ class ClamavManager extends Component return [$rc === 0, $msg]; } + private function isInstalled(): bool + { + return file_exists('/usr/sbin/clamd') + || file_exists('/lib/systemd/system/clamav-daemon.service') + || file_exists('/usr/lib/systemd/system/clamav-daemon.service'); + } + private function serviceActive(): bool { $exit = null;