Updating update-debian8-v16-to-v17.sh, ClamAV fixes

This commit is contained in:
dpeca 2016-11-17 14:38:04 +01:00
parent c8d5e32c7e
commit dfebb3fec7

View file

@ -63,6 +63,7 @@ fi
# RoundCube tinyMCE fix
if [ "$release" -eq '8' ]; then
tinymceFixArchiveURL=$vestacp/roundcube/roundcube-tinymce.tar.gz
tinymceParentFolder=/usr/share/roundcube/program/js
tinymceFolder=$tinymceParentFolder/tinymce
@ -82,6 +83,7 @@ if [[ -L "$tinymceFolder" && -d "$tinymceFolder" ]]; then
fi
fi
fi
fi
# Fixing empty NAT ip
@ -95,12 +97,34 @@ if [ -f "$file" ] && [ $( grep -ic "NAT=''" $file ) -eq 1 ]; then
fi
# Installing libmail-dkim-perl for better DKIM handling in Spamassassin
file="/etc/exim4/exim4.conf.template"
if [ -f "$file" ]; then
apt-get -y install libmail-dkim-perl > /dev/null 2>&1
fi
# Switching to mod_remoteip
if [ ! -f "/etc/apache2/mods-enabled/remoteip.load" ]; then
$VESTA/upd/switch_rpath.sh
fi
# Removing AllowSupplementaryGroups from clamav.conf
if [ -f "/etc/clamav/clamd.conf" ]; then
file="/etc/clamav/clamd.conf"
if [ $( grep -ic "# AllowSupplementaryGroups" $file ) -eq 0 ]; then
sed -i "s/AllowSupplementaryGroups/# AllowSupplementaryGroups/g" $file
service clamav-daemon restart
fi
fi
# Fixing /var/run/clamav permissions
if [ -f "/etc/systemd/system/multi-user.target.wants/clamav-daemon.service" ]; then
file="/etc/systemd/system/multi-user.target.wants/clamav-daemon.service"
if [ $( grep -ic "mkdir" $file ) -eq 0 ]; then
sed -i "s/\[Service\]/\[Service\]\nExecStartPre = \/bin\/mkdir -p \/var\/run\/clamav\nExecStartPre = \/bin\/chown -R clamav:clamav \/var\/run\/clamav/g" $file
service clamav-daemon restart
fi
fi