Lines 58-72
for config in ${dovecot_config}; do
Link Here
|
58 |
required_files="${config}" |
58 |
required_files="${config}" |
59 |
command_args="-c ${config}" |
59 |
command_args="-c ${config}" |
60 |
if [ -s ${config} ]; then |
60 |
if [ -s ${config} ]; then |
61 |
${command} ${command_args} -a 2>&1 >/dev/null |
61 |
doveconf_settings="$(${command} ${command_args} -a 2>/dev/null)" |
62 |
if [ $? -ne 0 ]; then |
62 |
if [ $? -ne 0 ]; then |
63 |
echo "==Error==" |
63 |
echo "==Error==" |
64 |
echo "Configuration file check failed." |
64 |
echo "Configuration file check failed." |
65 |
# Use dovecot to print the config error. |
65 |
# Use dovecot to print the config error. |
66 |
${command} ${command_args} -a |
66 |
${command} ${command_args} -a |
67 |
exit $? |
67 |
exit $? |
68 |
fi |
68 |
fi |
69 |
base_dir=$(${command} ${command_args} -a 2>/dev/null | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }') |
69 |
base_dir="$(echo "$doveconf_settings" | /usr/bin/awk -F '= ' '/^base_dir =/ { print $2 }')" |
70 |
pidfile="${base_dir}/master.pid" |
70 |
pidfile="${base_dir}/master.pid" |
71 |
else |
71 |
else |
72 |
echo "==Error==" |
72 |
echo "==Error==" |
73 |
- |
|
|