mirror of
https://github.com/ovh/debian-cis.git
synced 2025-06-24 11:34:35 +02:00
IMP(4.2.2.x): improve dealing with default conf
The default for journald is Compress=yes and ForwardToSyslog=yes So we check that Compress=no and ForwardToSyslog=no are not in the conf file.
This commit is contained in:

committed by
Thibault Serti

parent
6efefa07ac
commit
6127f2fe67
@ -62,7 +62,7 @@ apply() {
|
||||
does_pattern_exist_in_file "$FILE" "^$JOURNALD_PARAM"
|
||||
if [ "$FNRET" != 0 ]; then
|
||||
info "Parameter $JOURNALD_PARAM seems absent from $FILE, adding at the end"
|
||||
add_end_of_file "$FILE" "$JOURNALD_PARAM = $JOURNALD_VALUE"
|
||||
add_end_of_file "$FILE" "$JOURNALD_PARAM=$JOURNALD_VALUE"
|
||||
else
|
||||
info "Parameter $JOURNALD_PARAM is present but with the wrong value -- Fixing"
|
||||
replace_in_file "$FILE" "^$JOURNALD_PARAM=.*" "$JOURNALD_PARAM=$JOURNALD_VALUE"
|
||||
|
Reference in New Issue
Block a user