mirror of
https://github.com/ovh/debian-cis.git
synced 2024-11-26 07:21:22 +01:00
Redirect stderr to avoid printing "no such file" error
This commit is contained in:
parent
39246bc175
commit
d60922ab9d
@ -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