mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-22 06:14:19 -07:00
Avoid clamav fixes if clamav is disabled
This commit is contained in:
parent
302e351252
commit
d9202d91b9
1 changed files with 61 additions and 58 deletions
|
@ -141,6 +141,8 @@ if [ "$check_cron" -eq 0 ]; then
|
|||
crontab -l | { cat; echo "10 2 * * 6 sudo find /home/*/tmp/ -type f -mtime +5 -exec rm {} \;"; } | crontab -
|
||||
fi
|
||||
|
||||
unit_files="$(systemctl list-unit-files | grep clamav-daemon)"
|
||||
if [[ ! "$unit_files" =~ "disabled" ]]; then
|
||||
# make sure clamav-daemon.service has mkdir fix
|
||||
if [ -f "/lib/systemd/system/clamav-daemon.service" ]; then
|
||||
check_grep=$(grep -c 'mkdir' /lib/systemd/system/clamav-daemon.service)
|
||||
|
@ -187,23 +189,6 @@ if [ ! -f "/usr/local/vesta/data/upgrades/change-clamav-socket-v4" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Making sure mpm_event will stay
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/keeping-mpm-event-2" ]; then
|
||||
touch /usr/local/vesta/data/upgrades/keeping-mpm-event-2
|
||||
echo "=== scheduling keeping-mpm-event check script"
|
||||
echo "bash /usr/local/vesta/upd/keep_mpm_event.sh 'background' >> /usr/local/vesta/data/upgrades/keeping-mpm-event.log 2>&1" >> /usr/local/vesta/data/queue/restart.pipe
|
||||
/usr/local/vesta/bin/v-add-cron-restart-job > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Fixing ssl directive in nginx templates
|
||||
if [ "$release" -eq 9 ] || [ "$release" -eq 10 ]; then
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/fix_ssl_directive_in_templates" ]; then
|
||||
touch /usr/local/vesta/data/upgrades/fix_ssl_directive_in_templates
|
||||
echo "=== Fixing ssl directive in nginx templates"
|
||||
bash /usr/local/vesta/upd/fix_ssl_directive_in_templates.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# Block executable files inside zip/rar/tar archives in ClamAV
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/clamav_block_exe_in_archives" ]; then
|
||||
touch /usr/local/vesta/data/upgrades/clamav_block_exe_in_archives
|
||||
|
@ -220,6 +205,24 @@ if [ ! -f "/usr/local/vesta/data/upgrades/clamav_block_exe_in_archives" ]; then
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Making sure mpm_event will stay
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/keeping-mpm-event-2" ]; then
|
||||
touch /usr/local/vesta/data/upgrades/keeping-mpm-event-2
|
||||
echo "=== scheduling keeping-mpm-event check script"
|
||||
echo "bash /usr/local/vesta/upd/keep_mpm_event.sh 'background' >> /usr/local/vesta/data/upgrades/keeping-mpm-event.log 2>&1" >> /usr/local/vesta/data/queue/restart.pipe
|
||||
/usr/local/vesta/bin/v-add-cron-restart-job > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# Fixing ssl directive in nginx templates
|
||||
if [ "$release" -eq 9 ] || [ "$release" -eq 10 ]; then
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/fix_ssl_directive_in_templates" ]; then
|
||||
touch /usr/local/vesta/data/upgrades/fix_ssl_directive_in_templates
|
||||
echo "=== Fixing ssl directive in nginx templates"
|
||||
bash /usr/local/vesta/upd/fix_ssl_directive_in_templates.sh
|
||||
fi
|
||||
fi
|
||||
|
||||
# Clearing letsencrypt pipe
|
||||
if [ ! -f "/usr/local/vesta/data/upgrades/clearing-letsencrypt-pipe" ]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue