Checking if FreshClam is started after installation

This commit is contained in:
myvesta 2021-12-17 18:19:25 +01:00 committed by GitHub
commit 5d87f24b3f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,6 +25,18 @@ fi
echo "1" > /usr/local/vesta/data/upgrades/show_changelog echo "1" > /usr/local/vesta/data/upgrades/show_changelog
chmod a=rw /usr/local/vesta/data/upgrades/show_changelog chmod a=rw /usr/local/vesta/data/upgrades/show_changelog
# Checking if FreshClam is started after installation
if [ ! -f "/usr/local/vesta/data/upgrades/freshclam_start" ]; then
clamavup=$(/usr/local/vesta/bin/v-list-sys-services | grep 'clamav-daemon' | grep -c 'running')
freshclamdown=$(/usr/local/vesta/bin/v-list-sys-services | grep 'clamav-freshclam' | grep -c 'off')
if [ $clamavup -eq 1 ] && [ $freshclamdown -eq 1 ]; then
echo "== Starting FreshClam"
systemctl enable clamav-freshclam.service
systemctl start clamav-freshclam.service
fi
touch /usr/local/vesta/data/upgrades/freshclam_start
fi
# Fix Autoreply issue with Exim 4.94+ # Fix Autoreply issue with Exim 4.94+
if [ ! -f "/usr/local/vesta/data/upgrades/fix_exim_494_autoreply" ]; then if [ ! -f "/usr/local/vesta/data/upgrades/fix_exim_494_autoreply" ]; then
if [ "$release" -eq 11 ]; then if [ "$release" -eq 11 ]; then