mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-28 16:24:13 +02:00
Added file check when a profile is provided
This commit is contained in:
parent
b7f7179f1e
commit
b53b894f33
@ -315,7 +315,11 @@
|
|||||||
--profile)
|
--profile)
|
||||||
if [ $# -gt 1 ]; then
|
if [ $# -gt 1 ]; then
|
||||||
shift
|
shift
|
||||||
SEARCH_PROFILES=$1
|
if [ ! -r "$1" ]; then
|
||||||
|
echo "Fatal error: could not find or read the provided profile ($1)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
SEARCH_PROFILES="$1"
|
||||||
else
|
else
|
||||||
echo "Specify the profile (lynis audit system --profile /home/michael/myprofile.prf)"
|
echo "Specify the profile (lynis audit system --profile /home/michael/myprofile.prf)"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user