From 8616ff0b82a69aaa7dbc82ab27583b5d6cf02f56 Mon Sep 17 00:00:00 2001 From: Thom Pol Date: Mon, 21 Nov 2022 14:23:32 +0100 Subject: [PATCH 1/2] Don't show output of disabling apache2 service (#60) --- lib/os/class.ISPConfigDebianOS.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/os/class.ISPConfigDebianOS.inc.php b/lib/os/class.ISPConfigDebianOS.inc.php index fff17d7..e877bf0 100644 --- a/lib/os/class.ISPConfigDebianOS.inc.php +++ b/lib/os/class.ISPConfigDebianOS.inc.php @@ -1514,7 +1514,7 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"'; if(ISPConfig::$WEBSERVER === ISPC_WEBSERVER_NGINX) { $this->stopService('apache2'); - $cmd = 'systemctl disable apache2'; + $cmd = 'systemctl disable apache2 >/dev/null 2>&1'; $this->exec($cmd); // ignore if this fails $this->startService('nginx'); } -- GitLab From 277b0ddc32014f71869139f9f6f89f2eebdefbfa Mon Sep 17 00:00:00 2001 From: Thom Pol Date: Mon, 21 Nov 2022 14:26:37 +0100 Subject: [PATCH 2/2] Stop freshclam daemon before manually running it, and start again after freshclam has been executed (#60) --- lib/os/class.ISPConfigUbuntuOS.inc.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/os/class.ISPConfigUbuntuOS.inc.php b/lib/os/class.ISPConfigUbuntuOS.inc.php index 90b5624..3ab28dc 100644 --- a/lib/os/class.ISPConfigUbuntuOS.inc.php +++ b/lib/os/class.ISPConfigUbuntuOS.inc.php @@ -37,12 +37,14 @@ deb http://security.ubuntu.com/ubuntu bionic-security multiverse protected function afterPackageInstall($section = '') { if($section === 'mail') { + $this->stopService('clamav-freshclam'); $cmd = 'freshclam'; $result = $this->exec($cmd, array(62)); if($result === false) { //throw new ISPConfigOSException('Command ' . $cmd . ' failed.'); } + $this->startService('clamav-freshclam'); $this->startService('clamav-daemon'); } } -- GitLab