Update postinst

This commit is contained in:
myvesta 2020-07-21 00:17:40 +02:00 committed by GitHub
commit 373437e5f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -120,6 +120,18 @@ if [ ! -f "/usr/local/vesta/data/upgrades/change-clamav-socket-v3" ]; then
fi fi
fi fi
# reverting to default clamd sock
if [ ! -f "/usr/local/vesta/data/upgrades/change-clamav-socket-v4" ]; then
touch /usr/local/vesta/data/upgrades/change-clamav-socket-v4
if [ -f "/etc/clamav/clamd.conf" ]; then
check_grep=$(grep -c '/var/lib/clamav/clamd.ctl' /etc/clamav/clamd.conf)
if [ "$check_grep" -eq 1 ]; then
sed -i "s#/var/lib/clamav/clamd.ctl#/var/run/clamav/clamd.ctl#g" /etc/clamav/clamd.conf
systemctl restart clamav-daemon
fi
fi
fi
# Making sure mpm_event will stay # Making sure mpm_event will stay
if [ ! -f "/usr/local/vesta/data/upgrades/keeping-mpm-event" ]; then if [ ! -f "/usr/local/vesta/data/upgrades/keeping-mpm-event" ]; then
touch /usr/local/vesta/data/upgrades/keeping-mpm-event touch /usr/local/vesta/data/upgrades/keeping-mpm-event