mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-04 00:17:06 +00:00
More debug output
This commit is contained in:
parent
6ed1a2ad20
commit
2f1082a290
@ -99,14 +99,24 @@ before_miab_install() {
|
||||
}
|
||||
|
||||
|
||||
debug_output_conf_files() {
|
||||
dump_log "/etc/mailinabox.conf"
|
||||
dump_log "/etc/nsd/nsd.conf"
|
||||
dump_log "/etc/postfix/main.cf"
|
||||
}
|
||||
|
||||
miab_install() {
|
||||
H1 "MIAB-LDAP INSTALL"
|
||||
if ! setup/start.sh; then
|
||||
H1 "OUTPUT OF SELECT FILES"
|
||||
dump_log "/var/log/syslog" 100
|
||||
dump_log "/etc/mailinabox.conf"
|
||||
[ "$TRAVIS" == "true" ] && dump_log "/etc/nsd/nsd.conf"
|
||||
debug_output_conf_files
|
||||
H2; H2 "End"; H2
|
||||
die "setup/start.sh failed!"
|
||||
fi
|
||||
H1 "OUTPUT OF SELECT FILES"
|
||||
debug_output_conf_files
|
||||
H2; H2 "End"; H2
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,8 +1,4 @@
|
||||
|
||||
# ansi escapes for hilighting text
|
||||
F_DIMTEXT=$(echo -e "\037[31m")
|
||||
F_RESET=$(echo -e "\033[39m")
|
||||
|
||||
|
||||
die() {
|
||||
local msg="$1"
|
||||
@ -26,16 +22,21 @@ dump_log() {
|
||||
local log_file="$1"
|
||||
local lines="$2"
|
||||
local title="DUMP OF $log_file"
|
||||
echo -n "$F_DIMTEXT"
|
||||
echo ""
|
||||
echo "--------"
|
||||
echo -n "-------- $log_file"
|
||||
if [ -z "$lines" ]; then
|
||||
echo " (last $line lines)"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
echo "--------"
|
||||
|
||||
if [ ! -z "$lines" ]; then
|
||||
H1 "$title (last $lines lines)"
|
||||
tail -$lines "$log_file"
|
||||
else
|
||||
H1 "$title"
|
||||
cat "$log_file"
|
||||
fi
|
||||
H1 "END $title"
|
||||
echo -n "$F_RESET"
|
||||
}
|
||||
|
||||
install_qa_prerequisites() {
|
||||
|
@ -168,11 +168,11 @@ detect_slapd_log_error() {
|
||||
record "$F_DANGER[ERROR] $line$F_RESET"
|
||||
elif [ $r -eq 2 ]; then
|
||||
let wc+=1
|
||||
record "$F_WARN[WARN ] $line$F_RESET"
|
||||
record "$F_WARN[ WARN] $line$F_RESET"
|
||||
elif [ $r -eq 3 ]; then
|
||||
let ignored+=1
|
||||
else
|
||||
record "[OK ] $line"
|
||||
record "[ OK] $line"
|
||||
fi
|
||||
done
|
||||
record "$ignored unreported/ignored log lines"
|
||||
@ -214,7 +214,7 @@ detect_dovecot_log_error() {
|
||||
elif [ $r -eq 2 ]; then
|
||||
let ignored+=1
|
||||
else
|
||||
record "[ OK] $line"
|
||||
record "[ OK] $line"
|
||||
fi
|
||||
done
|
||||
record "$ignored unreported/ignored log lines"
|
||||
|
Loading…
Reference in New Issue
Block a user