blob: be1828ad10007ac4065ac6f97548a9104c7ec6c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/sh
# Configuration Sanity Checking for qmail
# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail-ldap/files/1.03-r3/config-sanity-check,v 1.2 2004/07/18 03:27:44 dragonheart Exp $
# This is intended solely to stop qmail eating up all your hard disk space with logs
CONFIG_SANITY_GOOD=1
# check simple stuff first
if [ -z "${QMAILDUID}" -o -z "${NOFILESGID}" -o -z "${SERVICE}" ]; then
echo "SERVICE(${SERVICE}), QMAILDUID(${QMAILDUID}) or NOFILESGID(${NOFILESGID}) is unset in $0"
CONFIG_SANITY_GOOD=0
fi
# now make sure we are are on a port that is resolable to a port number
if [ -z "`getent services ${TCPSERVER_PORT}`" ]; then
CONFIG_SANITY_GOOD=0
fi
if [ ! "${CONFIG_SANITY_GOOD}" -eq "1" ]; then
echo "Some error detected, sleeping for 30 seconds for safety"
sleep 30s
exit 1
fi
|