Skip to content

Commit

Permalink
updated goss path in script
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Bolwell <[email protected]>
  • Loading branch information
uk-bolly committed Sep 14, 2023
1 parent b528f12 commit 95810be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions run_audit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,12 @@ echo
export FAILURE=0
if [ -s "${AUDIT_BIN}" ]; then
echo "OK - Audit binary $AUDIT_BIN is available"
goss_installed_version="$(goss -v | awk '{print $NF}' | cut -dv -f2)"
goss_installed_version="$($AUDIT_BIN -v | awk '{print $NF}' | cut -dv -f2)"
ver_calc=$(awk 'BEGIN{print $goss_installed_version < $AUDIT_BIN_MIN_VER}')
if [ $AUDIT_BIN_MIN_VER = "$goss_installed_version" ] || [ "$ver_calc" = 1 ] ; then
echo "OK - Goss is installed and Version is ok";
else
echo "WARNING - Goss installed = $goss_installed_version, does not met minimum of $AUDIT_BIN_MIN_VER"; export FAILURE=2
echo "WARNING - Goss installed = ${goss_installed_version}, does not met minimum of ${AUDIT_BIN_MIN_VER}"; export FAILURE=2
fi
else
echo "WARNING - The audit binary is not available at $AUDIT_BIN "; export FAILURE=1
Expand Down

0 comments on commit 95810be

Please sign in to comment.