Last active
November 26, 2019 23:08
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
see also https://gist.github.com/dlangille/8137ea3d4f9d47569de40eef10fe7689