mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-27 07:34:50 +02:00
Modify virul scan server:clamav-daemon server audit methods.
This commit is contained in:
parent
ed638b68d4
commit
00cc8e4f67
@ -12,13 +12,11 @@ set -e # One error, it's over
|
|||||||
set -u # One variable unset, it's over
|
set -u # One variable unset, it's over
|
||||||
|
|
||||||
HARDENING_LEVEL=3
|
HARDENING_LEVEL=3
|
||||||
VIRULSERVER='clamav-freshclam'
|
VIRULSERVER='clamav-daemon'
|
||||||
|
|
||||||
PACKAGES='clamav'
|
|
||||||
|
|
||||||
# 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 () {
|
||||||
if [ $(dpkg -l | grep $PACKAGES | wc -l) -ge 1 ]; then
|
if [ $(dpkg -l | grep $VIRULSERVER | wc -l) -ge 1 ]; then
|
||||||
if [ $(systemctl | grep $VIRULSERVER | grep "active running" | wc -l) -ne 1 ]; then
|
if [ $(systemctl | grep $VIRULSERVER | grep "active running" | wc -l) -ne 1 ]; then
|
||||||
crit "$VIRULSERVER is not runing"
|
crit "$VIRULSERVER is not runing"
|
||||||
FNRET=2
|
FNRET=2
|
||||||
@ -27,7 +25,7 @@ audit () {
|
|||||||
FNRET=0
|
FNRET=0
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
crit "$PACKAGES is not installed"
|
crit "$VIRULSERVER is not installed"
|
||||||
FNRET=1
|
FNRET=1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user