add log details to be more comprehensive (#49)

Co-authored-by: Jeremy Denoun <jeremy.denoun@iguanesolutions.com>
This commit is contained in:
jeremydenoun 2021-02-17 12:04:11 +01:00 committed by GitHub
parent 84ac4db90f
commit b44fb47c3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ audit() {
for FILE in $FILES_PRESENT; do
does_file_exist "$FILE"
if [ "$FNRET" != 0 ]; then
crit "$FILE is absent"
crit "$FILE is absent, should exist"
else
has_file_correct_ownership "$FILE" "$USER" "$GROUP"
if [ "$FNRET" = 0 ]; then
@ -69,7 +69,7 @@ apply() {
for FILE in $FILES_PRESENT; do
does_file_exist "$FILE"
if [ "$FNRET" != 0 ]; then
warn "$FILE is absent"
warn "$FILE is absent, fixing (touch)"
touch "$FILE"
fi
has_file_correct_ownership "$FILE" "$USER" "$GROUP"