mirror of
https://github.com/ovh/debian-cis.git
synced 2025-07-02 23:39:49 +02:00
Fixed default file error handling and quickstart
This commit is contained in:
@ -48,11 +48,16 @@ if [ ! -r /etc/default/cis-hardening ]; then
|
||||
exit 128
|
||||
else
|
||||
. /etc/default/cis-hardening
|
||||
if [ -z $CIS_ROOT_DIR ]; then
|
||||
if [ -z ${CIS_ROOT_DIR:-} ]; then
|
||||
echo "No CIS_ROOT_DIR variable, aborting"
|
||||
exit 128
|
||||
fi
|
||||
fi
|
||||
|
||||
# Main function, will call the proper functions given the configuration (audit, enabled, disabled)
|
||||
[ -r $CIS_ROOT_DIR/lib/main.sh ] && . $CIS_ROOT_DIR/lib/main.sh
|
||||
if [ -r $CIS_ROOT_DIR/lib/main.sh ]; then
|
||||
. $CIS_ROOT_DIR/lib/main.sh
|
||||
else
|
||||
echo "Cannot find main.sh, have you correctly defined your root directory? Current value is $CIS_ROOT_DIR in /etc/default/cis-hardening"
|
||||
exit 128
|
||||
fi
|
||||
|
Reference in New Issue
Block a user