mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-22 21:47:02 +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
|
SEARCH_RES=0
|
||||||
LIMIT_FILES=""
|
LIMIT_FILES=""
|
||||||
if $SUDO_CMD [ -d $LIMIT_DIR ]; then
|
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"
|
LIMIT_FILES="$LIMIT_FILES $LIMIT_DIR/$file"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user