Skip to content

Instantly share code, notes, and snippets.

@dlangille
Last active November 26, 2019 23:08
Show Gist options
  • Select an option

  • Save dlangille/bc9ae5b2bd37e1301cddd5d56a93da40 to your computer and use it in GitHub Desktop.

Select an option

Save dlangille/bc9ae5b2bd37e1301cddd5d56a93da40 to your computer and use it in GitHub Desktop.
A Nagios check for FreeBSD hosts which have https://www.freshports.org/security/base-audit/ installed
#!/bin/sh
SUDO="/usr/local/bin/sudo"
PKG_BASE_AUDIT="/usr/local/etc/periodic/security/405.pkg-base-audit"
RESULT=`${SUDO} ${PKG_BASE_AUDIT} 2>&1`
CODE=$?
if [ "${CODE}" == "0" ]
then
echo 'No problems found'
exit 0
else
echo ${RESULT}
exit 2
fi
@dlangille

Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment