Fix a bug for 6.17: install clamav in CentOS8.
This commit is contained in:
parent
33588912b3
commit
837125d368
|
@ -14,6 +14,7 @@ set -u # One variable unset, it's over
|
||||||
|
|
||||||
HARDENING_LEVEL=4
|
HARDENING_LEVEL=4
|
||||||
VIRULSERVER='clamav-daemon'
|
VIRULSERVER='clamav-daemon'
|
||||||
|
VIRULSERVER_REDHAT='clamav-server clamav-data clamav-update clamav-filesystem clamav clamav-scanner-systemd clamav-devel clamav-lib clamav-server-systemd'
|
||||||
|
|
||||||
# This function will be called if the script status is on enabled / audit mode
|
# This function will be called if the script status is on enabled / audit mode
|
||||||
audit () {
|
audit () {
|
||||||
|
@ -33,8 +34,10 @@ audit () {
|
||||||
elif [ $OS_RELEASE -eq 2 ]; then
|
elif [ $OS_RELEASE -eq 2 ]; then
|
||||||
if [ $(rpm -qa | grep -c clamd) -ge 1 ]; then
|
if [ $(rpm -qa | grep -c clamd) -ge 1 ]; then
|
||||||
ok "Clamav is installed"
|
ok "Clamav is installed"
|
||||||
|
FNRET=0
|
||||||
else
|
else
|
||||||
crit "Clamav is not install"
|
crit "Clamav is not install"
|
||||||
|
FNRET=1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
crit "Current OS is not support!"
|
crit "Current OS is not support!"
|
||||||
|
@ -55,10 +58,10 @@ apply () {
|
||||||
fi
|
fi
|
||||||
elif [ $OS_RELEASE -eq 2 ]; then
|
elif [ $OS_RELEASE -eq 2 ]; then
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
ok "$VIRULSERVER is enable"
|
ok "$VIRULSERVER_REDHAT is enable"
|
||||||
elif [ $FNRET = 1 ]; then
|
elif [ $FNRET = 1 ]; then
|
||||||
warn "Install $VIRULSERVER"
|
warn "Install $VIRULSERVER_REDHAT"
|
||||||
yum install -y $VIRULSERVER
|
yum install -y $VIRULSERVER_REDHAT
|
||||||
else
|
else
|
||||||
warn "Start server $VIRULSERVER"
|
warn "Start server $VIRULSERVER"
|
||||||
systemctl start $VIRULSERVER
|
systemctl start $VIRULSERVER
|
||||||
|
|
Loading…
Reference in New Issue