mirror of https://github.com/CISOfy/lynis.git
Allow automatic configuration of a setting
This commit is contained in:
parent
748039358c
commit
a45d6e61f8
|
@ -80,19 +80,23 @@
|
|||
#read VALUE
|
||||
else
|
||||
Debug "Setting '${SETTING}' should be configured with value '${VALUE}'"
|
||||
FIND=$(grep "^${SETTING}" ${CUSTOM_PROFILE})
|
||||
if [ "${FIND}" = "" ]; then
|
||||
${ECHOCMD} "Configuring setting '${CYAN}${SETTING}${NORMAL}'"
|
||||
echo "${SETTING}=${VALUE}" >> ${CUSTOM_PROFILE}
|
||||
else
|
||||
${ECHOCMD} "${RED}Error${NORMAL}: Setting '${CYAN}${SETTING}${NORMAL}' was already configured:${NORMAL} ${WHITE}${FIND}${NORMAL}"
|
||||
fi
|
||||
fi
|
||||
# Now check if value is in line with expected type (boolean, integer, string)
|
||||
# =To be implemented=
|
||||
done
|
||||
${ECHOCMD} ""
|
||||
${ECHOCMD} "${YELLOW}Note${NORMAL}: ${WHITE}Automatic configuration not fully implemented yet.${NORMAL}"
|
||||
${ECHOCMD} ""
|
||||
ExitClean
|
||||
|
||||
fi
|
||||
|
||||
|
||||
ExitClean
|
||||
|
||||
|
||||
# The End
|
||||
|
|
Loading…
Reference in New Issue