#
# run-functions  This file contains functions common to the qmail run scripts
#

exec 2>&1

PATH="/sbin:/usr/sbin:/bin:/usr/bin:$PATH"

# Read the contents of a control file, substituting the given default
# string if the file is empty.
readdefault() {
	var=$1; shift
	file=$1; shift
	if [ -s /var/qmail/control/$file ]; then
		export $var="`cat /var/qmail/control/$file`"
	else
		export $var="$*"
	fi
}
