File: oscap-scan.cron

package info (click to toggle)
openscap 1.4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 125,116 kB
  • sloc: xml: 527,136; ansic: 91,867; sh: 19,831; python: 2,531; perl: 444; makefile: 49
file content (26 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

##########
# This script can be installed to get regular oscap-scan checks. Results are 
# sent to root mail. Please configure oscap-scan options before you use it!
##########

#OPTIONS="oval eval --report /var/log/oscap-scan.html.log --results /var/log/oscap-scan.xml.log /usr/share/openscap/scap-fedora14-oval.xml"
PROG="/usr/bin/oscap"
if [ -z "$OPTIONS" ]
then
	logger "OpenSCAP security scan: NOT CONFIGURED. (Cron job)"
	exit 0
fi

$PROG $OPTIONS
RETVAL=$?
if [ $RETVAL -eq 0 ] ; then
	logger "OpenSCAP security scan: PASS. (Cron job)"
elif [ $RETVAL -eq 1 ] ; then
	logger "OpenSCAP security scan: ERROR. (Cron job)"
else
	logger "OpenSCAP security scan: FAILED. (Cron job)"
fi
exit "$RETVAL"