diff --git a/app/Livewire/Ui/Security/ClamavManager.php b/app/Livewire/Ui/Security/ClamavManager.php index a5eb697..d614dae 100644 --- a/app/Livewire/Ui/Security/ClamavManager.php +++ b/app/Livewire/Ui/Security/ClamavManager.php @@ -2,7 +2,6 @@ namespace App\Livewire\Ui\Security; -use App\Jobs\ClamavEnable; use Livewire\Attributes\Layout; use Livewire\Attributes\Title; use Livewire\Component; @@ -77,8 +76,12 @@ class ClamavManager extends Component { $this->lastError = ''; $this->lastSuccess = ''; + [$ok, $msg] = $this->runCmd('enable'); + if (!$ok) { + $this->lastError = $msg; + return; + } file_put_contents(self::STARTING_FLAG, time()); - ClamavEnable::dispatch(); $this->enabled = true; $this->starting = true; $this->startSecs = 0; diff --git a/resources/views/livewire/ui/security/clamav-manager.blade.php b/resources/views/livewire/ui/security/clamav-manager.blade.php index 9d06ec4..a34ecde 100644 --- a/resources/views/livewire/ui/security/clamav-manager.blade.php +++ b/resources/views/livewire/ui/security/clamav-manager.blade.php @@ -92,7 +92,7 @@
@if($starting) -
+
Wird gestartet… {{ $startSecs }}s diff --git a/scripts/mailwolt-clamav b/scripts/mailwolt-clamav index dbc1fe7..3916f13 100755 --- a/scripts/mailwolt-clamav +++ b/scripts/mailwolt-clamav @@ -14,8 +14,8 @@ case "$CMD" in ;; enable) systemctl enable clamav-daemon - systemctl start clamav-daemon - echo "ClamAV aktiviert und gestartet." + systemctl start --no-block clamav-daemon + echo "ClamAV aktiviert, Startvorgang eingeleitet." ;; disable) systemctl stop clamav-daemon || true