mirror of
https://github.com/CISOfy/lynis.git
synced 2025-07-30 01:04:39 +02:00
Check for available parameter when using profile or plugindir
This commit is contained in:
parent
9f7aeb3e21
commit
08ee8136d5
@ -279,12 +279,18 @@
|
|||||||
|
|
||||||
# Define a custom profile file
|
# Define a custom profile file
|
||||||
--profile)
|
--profile)
|
||||||
|
if [ $# -gt 1 ]; then
|
||||||
shift
|
shift
|
||||||
SEARCH_PROFILES=$1
|
SEARCH_PROFILES=$1
|
||||||
|
else
|
||||||
|
echo "Specify the profile (lynis audit system --profile /home/michael/myprofile.prf)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Define a custom plugin directory
|
# Define a custom plugin directory
|
||||||
--plugindir | --plugin-dir | --plugins-dir)
|
--plugindir | --plugin-dir | --plugins-dir)
|
||||||
|
if [ $# -gt 1 ]; then
|
||||||
shift
|
shift
|
||||||
PLUGINDIR=$1
|
PLUGINDIR=$1
|
||||||
LASTCHAR=$(echo $1 | awk '{ print substr($0, length($0))}')
|
LASTCHAR=$(echo $1 | awk '{ print substr($0, length($0))}')
|
||||||
@ -296,6 +302,10 @@
|
|||||||
echo "${RED}Error:${WHITE} invalid plugin directory ${PLUGINDIR}${NORMAL}"
|
echo "${RED}Error:${WHITE} invalid plugin directory ${PLUGINDIR}${NORMAL}"
|
||||||
ExitCustom 66
|
ExitCustom 66
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
echo "Specify the plugin directory (lynis audit system --plugindir /home/michael/plugins)"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Quiet mode
|
# Quiet mode
|
||||||
|
Loading…
x
Reference in New Issue
Block a user