mirror of
https://github.com/hardenedlinux/harbian-audit.git
synced 2025-07-25 06:35:54 +02:00
Modified 4.4 to be compatible with CentOS.
This commit is contained in:
parent
2a1d76d397
commit
74db39a3ae
@ -1,7 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
#
|
#
|
||||||
# harbian audit 7/8/9 Hardening
|
# harbian audit 7/8/9/10 or CentOS Hardening
|
||||||
|
# Modify by: Samson-W (samson@hardenedlinux.org)
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -28,16 +29,26 @@ audit () {
|
|||||||
|
|
||||||
# This function will be called if the script status is on enabled mode
|
# This function will be called if the script status is on enabled mode
|
||||||
apply () {
|
apply () {
|
||||||
is_pkg_installed $PACKAGE
|
if [ $OS_RELEASE -eq 2 ]; then
|
||||||
if [ $FNRET = 0 ]; then
|
if [ $FNRET = 0 ]; then
|
||||||
crit "$PACKAGE is installed, purging it"
|
crit "$PACKAGE is installed, purging it"
|
||||||
/usr/sbin/prelink -ua
|
"$(which $PACKAGE)" -ua
|
||||||
apt-get purge $PACKAGE -y
|
yum autoremove $PACKAGE -y
|
||||||
apt-get autoremove
|
else
|
||||||
else
|
ok "$PACKAGE is absent"
|
||||||
ok "$PACKAGE is absent"
|
fi
|
||||||
fi
|
elif [ $OS_RELEASE -eq 1 ]; then
|
||||||
:
|
if [ $FNRET = 0 ]; then
|
||||||
|
crit "$PACKAGE is installed, purging it"
|
||||||
|
/usr/sbin/prelink -ua
|
||||||
|
apt-get purge $PACKAGE -y
|
||||||
|
apt-get autoremove
|
||||||
|
else
|
||||||
|
ok "$PACKAGE is absent"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
crit "Current OS is not support!"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# This function will check config parameters required
|
# This function will check config parameters required
|
||||||
|
Loading…
x
Reference in New Issue
Block a user