xref: /dragonfly/etc/periodic/daily/500.queuerun (revision d4ef6694)
1#!/bin/sh
2#
3# $FreeBSD: src/etc/periodic/daily/500.queuerun,v 1.1.2.3 2002/04/15 01:56:15 gshapiro Exp $
4# $DragonFly: src/etc/periodic/daily/500.queuerun,v 1.2 2003/06/17 04:24:48 dillon Exp $
5#
6
7# If there is a global system configuration file, suck it in.
8#
9if [ -r /etc/defaults/periodic.conf ]
10then
11    . /etc/defaults/periodic.conf
12    source_periodic_confs
13fi
14
15case "$daily_queuerun_enable" in
16    [Yy][Ee][Ss])
17	if [ ! -x /usr/sbin/sendmail ]
18	then
19	    echo '$daily_queuerun_enable is set but /usr/sbin/sendmail' \
20		"isn't executable"
21	    rc=2
22	else
23	    /usr/sbin/sendmail -q >/dev/null 2>&1 &
24	    case "$daily_submit_queuerun" in
25	    [Yy][Ee][Ss])
26		if [ -f /etc/mail/submit.cf ]
27		then
28		    /usr/sbin/sendmail -q -Ac >/dev/null 2>&1 &
29		fi;;
30	    esac
31	    rc=0
32	fi;;
33
34    *)  rc=0;;
35esac
36
37exit $rc
38