mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-22 22:15:24 +01:00
Redirect stderr to avoid printing "no such file" error
This commit is contained in:
parent
76abf8da36
commit
7077554bca
@ -24,7 +24,7 @@ audit () {
|
||||
SEARCH_RES=0
|
||||
LIMIT_FILES=""
|
||||
if $SUDO_CMD [ -d $LIMIT_DIR ]; then
|
||||
for file in $($SUDO_CMD ls $LIMIT_DIR/*.conf); do
|
||||
for file in $($SUDO_CMD ls $LIMIT_DIR/*.conf 2>/dev/null); do
|
||||
LIMIT_FILES="$LIMIT_FILES $LIMIT_DIR/$file"
|
||||
done
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user