[Midnightbsd-cvs] src [11778] trunk/etc/periodic/weekly: security status
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 11 18:22:30 EDT 2018
Revision: 11778
http://svnweb.midnightbsd.org/src/?rev=11778
Author: laffer1
Date: 2018-07-11 18:22:29 -0400 (Wed, 11 Jul 2018)
Log Message:
-----------
security status
Modified Paths:
--------------
trunk/etc/periodic/weekly/Makefile
Added Paths:
-----------
trunk/etc/periodic/weekly/450.status-security
Added: trunk/etc/periodic/weekly/450.status-security
===================================================================
--- trunk/etc/periodic/weekly/450.status-security (rev 0)
+++ trunk/etc/periodic/weekly/450.status-security 2018-07-11 22:22:29 UTC (rev 11778)
@@ -0,0 +1,47 @@
+#!/bin/sh
+#
+# $MidnightBSD$
+#
+
+# If there is a global system configuration file, suck it in.
+#
+if [ -r /etc/defaults/periodic.conf ]
+then
+ . /etc/defaults/periodic.conf
+ source_periodic_confs
+fi
+
+case "$weekly_status_security_enable" in
+ [Yy][Ee][Ss])
+ echo ""
+ echo "Security check:"
+
+ case "$weekly_status_security_inline" in
+ [Yy][Ee][Ss])
+ weekly_status_security_output="";;
+ esac
+
+ export security_output="${weekly_status_security_output}"
+ rc=0
+ case "${weekly_status_security_output}" in
+ "")
+ if tempfile=`mktemp ${TMPDIR:-/tmp}/450.status-security.XXXXXX`
+ then
+ periodic security > $tempfile || rc=3
+ if [ -s "$tempfile" ]; then
+ cat "$tempfile"
+ rc=3
+ fi
+ rm -f "$tempfile"
+ fi;;
+ /*)
+ echo " (output logged separately)"
+ periodic security || rc=3;;
+ *)
+ echo " (output mailed separately)"
+ periodic security || rc=3;;
+ esac;;
+ *) rc=0;;
+esac
+
+exit $rc
Property changes on: trunk/etc/periodic/weekly/450.status-security
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/etc/periodic/weekly/Makefile
===================================================================
--- trunk/etc/periodic/weekly/Makefile 2018-07-11 22:12:11 UTC (rev 11777)
+++ trunk/etc/periodic/weekly/Makefile 2018-07-11 22:22:29 UTC (rev 11778)
@@ -4,6 +4,7 @@
FILES= 340.noid \
350.msearch \
+ 450.status-security \
999.local
# NB: keep these sorted by MK_* knobs
More information about the Midnightbsd-cvs
mailing list