o Add a script to check ntpd(8) state. Default is off.
PR: conf/112604 Submitted by: Oliver Fromme MFC after: 1 month
This commit is contained in:
parent
a6661bed8b
commit
c7cc017f3b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=169517
@ -130,6 +130,9 @@ daily_status_mail_rejects_logs=3 # How many logs to check
|
||||
daily_status_named_enable="YES"
|
||||
daily_status_named_usedns="YES" # DNS lookups are ok
|
||||
|
||||
# 480.status-ntpd
|
||||
daily_status_ntpd_enable="NO" # Check NTP status
|
||||
|
||||
# 500.queuerun
|
||||
daily_queuerun_enable="YES" # Run mail queue
|
||||
daily_submit_queuerun="YES" # Also submit queue
|
||||
|
28
etc/periodic/daily/480.status-ntpd
Normal file
28
etc/periodic/daily/480.status-ntpd
Normal file
@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# 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
|
||||
|
||||
rc=0
|
||||
|
||||
case "$daily_status_ntpd_enable" in
|
||||
[Yy][Ee][Ss])
|
||||
echo ""
|
||||
echo "NTP status:"
|
||||
|
||||
synchronized=$(ntpq -p | tee /dev/stderr | grep '^\*')
|
||||
if [ -z "$synchronized" ]; then
|
||||
rc=1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
exit $rc
|
@ -25,7 +25,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd September 3, 2006
|
||||
.Dd May 12, 2007
|
||||
.Dt PERIODIC.CONF 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -592,6 +592,11 @@ for the previous day.
|
||||
Set to
|
||||
.Dq Li YES
|
||||
if you want to enable reverse DNS lookups.
|
||||
.It Va daily_status_ntpd
|
||||
.Pq Vt bool
|
||||
Set to
|
||||
.Dq Li YES
|
||||
if you want to enable NTP status check.
|
||||
.It Va daily_queuerun_enable
|
||||
.Pq Vt bool
|
||||
Set to
|
||||
|
Loading…
Reference in New Issue
Block a user