mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-01 01:17:02 +00:00
mail/dovecot: give better error message(s) when there are configuration errors.
PR: 232785 Submitted by: prj@rootwyrm.com
This commit is contained in:
parent
16dca32152
commit
d3bf037d52
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=483437
@ -8,7 +8,7 @@
|
||||
|
||||
PORTNAME= dovecot
|
||||
PORTVERSION= 2.3.3
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= mail ipv6
|
||||
MASTER_SITES= https://www.dovecot.org/releases/2.3/
|
||||
|
||||
|
@ -60,6 +60,14 @@ for config in ${dovecot_config}; do
|
||||
required_files="${config}"
|
||||
command_args="-c ${config}"
|
||||
if [ -s ${config} ]; then
|
||||
${command} ${command_args} -a 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "==Error=="
|
||||
echo "Configuration file check failed."
|
||||
# Use dovecot to print the config error.
|
||||
${command} ${command_args} -a
|
||||
exit $?
|
||||
fi
|
||||
base_dir=$(${command} ${command_args} -a 2>/dev/null | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')
|
||||
pidfile="${base_dir}/master.pid"
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user