mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 18:49:17 -07:00
Merge pull request #1798 from cmstew/cmstew-amazon-linux-clamd-patch
cmstew amazon linux clamd patch
This commit is contained in:
commit
70748e302e
3 changed files with 57 additions and 9 deletions
|
@ -23,7 +23,7 @@ software="nginx httpd mod_ssl mod_ruid2 mod_fcgid mod_extract_forwarded
|
|||
php php-common php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt
|
||||
php-mysql php-pdo php-soap php-tidy php-xml php-xmlrpc php-fpm php-pgsql
|
||||
awstats webalizer vsftpd proftpd bind bind-utils bind-libs exim dovecot
|
||||
clamd spamassassin mysql mysql-server phpMyAdmin postgresql
|
||||
clamd clamav-update spamassassin mysql mysql-server phpMyAdmin postgresql
|
||||
postgresql-server postgresql-contrib phpPgAdmin e2fsprogs openssh-clients
|
||||
ImageMagick curl mc screen ftp zip unzip flex sqlite pcre sudo bc jwhois
|
||||
mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype fail2ban
|
||||
|
@ -530,7 +530,7 @@ service exim stop > /dev/null 2>&1
|
|||
cp -r /etc/exim/* $vst_backups/exim >/dev/null 2>&1
|
||||
|
||||
# Backup ClamAV configuration
|
||||
service clamd stop > /dev/null 2>&1
|
||||
service clamd.scan stop > /dev/null 2>&1
|
||||
cp /etc/clamd.conf $vst_backups/clamd >/dev/null 2>&1
|
||||
cp -r /etc/clamd.d $vst_backups/clamd >/dev/null 2>&1
|
||||
|
||||
|
@ -648,7 +648,6 @@ if [ "$exim" != 'no' ]; then
|
|||
check_result $? "yum install failed"
|
||||
fi
|
||||
|
||||
|
||||
#----------------------------------------------------------#
|
||||
# Configure system #
|
||||
#----------------------------------------------------------#
|
||||
|
@ -790,7 +789,7 @@ fi
|
|||
if [ "$exim" = 'yes' ]; then
|
||||
echo "MAIL_SYSTEM='exim'" >> $VESTA/conf/vesta.conf
|
||||
if [ "$clamd" = 'yes' ]; then
|
||||
echo "ANTIVIRUS_SYSTEM='clamav'" >> $VESTA/conf/vesta.conf
|
||||
echo "ANTIVIRUS_SYSTEM='clamd.scan'" >> $VESTA/conf/vesta.conf
|
||||
fi
|
||||
if [ "$spamd" = 'yes' ]; then
|
||||
echo "ANTISPAM_SYSTEM='spamassassin'" >> $VESTA/conf/vesta.conf
|
||||
|
@ -1147,10 +1146,12 @@ if [ "$clamd" = 'yes' ]; then
|
|||
useradd clam -s /sbin/nologin -d /var/lib/clamav 2>/dev/null
|
||||
gpasswd -a clam exim
|
||||
gpasswd -a clam mail
|
||||
cp -f $vestacp/clamav/clamd.conf /etc/
|
||||
cp -r /etc/clamd.d $vst_backups/clamd >/dev/null 2>&1
|
||||
cp -f $vestacp/clamav/clamd.conf /etc/clamd.conf
|
||||
ln -sf /etc/clamd.conf /etc/clamd.d/scan.conf
|
||||
cp -f $vestacp/clamav/freshclam.conf /etc/
|
||||
mkdir -p /var/log/clamav /var/run/clamav
|
||||
chown clam:clam /var/log/clamav /var/run/clamav
|
||||
mkdir -p /var/log/clamav /var/run/clamav /var/run/clamd.scan
|
||||
chown clam:clam /var/log/clamav /var/run/clamav /var/run/clamd.scan
|
||||
chown -R clam:clam /var/lib/clamav
|
||||
if [ "$release" -ge '7' ]; then
|
||||
cp -f $vestacp/clamav/clamd.service /usr/lib/systemd/system/
|
||||
|
@ -1161,8 +1162,8 @@ if [ "$clamd" = 'yes' ]; then
|
|||
sed -i "s/nofork/foreground/" /usr/lib/systemd/system/clamd.service
|
||||
systemctl daemon-reload
|
||||
fi
|
||||
chkconfig clamd on
|
||||
service clamd start
|
||||
chkconfig clamd.scan on
|
||||
service clamd.scan start
|
||||
#check_result $? "clamd start failed"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue