| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
########## |
| 4 |
# This script can be installed to get regular oscap-scan checks. Results are |
| 5 |
# sent to root mail. Please configure oscap-scan options before you use it! |
| 6 |
########## |
| 7 |
|
| 8 |
#OPTIONS="oval eval --report /var/log/oscap-scan.html.log --results /var/log/oscap-scan.xml.log /usr/share/openscap/scap-fedora14-oval.xml" |
| 9 |
PROG="/usr/bin/oscap" |
| 10 |
if [ -z "$OPTIONS" ] |
| 11 |
then |
| 12 |
logger "OpenSCAP security scan: NOT CONFIGURED. (Cron job)" |
| 13 |
exit 0 |
| 14 |
fi |
| 15 |
|
| 16 |
$PROG $OPTIONS |
| 17 |
RETVAL=$? |
| 18 |
if [ $RETVAL -eq 0 ] ; then |
| 19 |
logger "OpenSCAP security scan: PASS. (Cron job)" |
| 20 |
elif [ $RETVAL -eq 1 ] ; then |
| 21 |
logger "OpenSCAP security scan: ERROR. (Cron job)" |
| 22 |
else |
| 23 |
logger "OpenSCAP security scan: FAILED. (Cron job)" |
| 24 |
fi |
| 25 |
exit "$RETVAL" |
| 26 |
|