mirror of
https://github.com/ovh/debian-cis.git
synced 2025-08-31 11:54:07 +02:00
fix: --set-hardening-level is messing with configuration files
fix issue #275
This commit is contained in:
@@ -304,7 +304,7 @@ if [ -n "$SET_HARDENING_LEVEL" ] && [ "$SET_HARDENING_LEVEL" != 0 ]; then
|
|||||||
fi
|
fi
|
||||||
wantedstatus=disabled
|
wantedstatus=disabled
|
||||||
[ "$script_level" -le "$SET_HARDENING_LEVEL" ] && wantedstatus=enabled
|
[ "$script_level" -le "$SET_HARDENING_LEVEL" ] && wantedstatus=enabled
|
||||||
sed -i -re "s/^status=.+/status=$wantedstatus/" "${CIS_CONF_DIR}/conf.d/$SCRIPT_BASENAME.cfg"
|
sed --follow-symlinks -i -re "s/^status=.+/status=$wantedstatus/" "${CIS_CONF_DIR}/conf.d/$SCRIPT_BASENAME.cfg"
|
||||||
done
|
done
|
||||||
echo "Configuration modified to enable scripts for hardening level at or below $SET_HARDENING_LEVEL"
|
echo "Configuration modified to enable scripts for hardening level at or below $SET_HARDENING_LEVEL"
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user