mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-31 19:00:54 +00:00 
			
		
		
		
	Output formatting changes
This commit is contained in:
		
							parent
							
								
									8be3011c19
								
							
						
					
					
						commit
						f4fda41705
					
				| @ -61,7 +61,7 @@ before_miab_install() { | ||||
| 
 | ||||
|     # update package lists before installing anything | ||||
|     H2 "apt-get update" | ||||
|     apt-get update || die "apt-get update failed!" | ||||
|     apt-get update -qq || die "apt-get update failed!" | ||||
|      | ||||
|     # install prerequisites | ||||
|     H2 "QA prerequisites" | ||||
| @ -99,23 +99,17 @@ 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 | ||||
|         debug_output_conf_files | ||||
|         dump_conf_files | ||||
|         H2; H2 "End"; H2 | ||||
|         die "setup/start.sh failed!" | ||||
|     fi | ||||
|     H1 "OUTPUT OF SELECT FILES" | ||||
|     debug_output_conf_files | ||||
|     dump_conf_files | ||||
|     H2; H2 "End"; H2 | ||||
| } | ||||
| 
 | ||||
|  | ||||
| @ -9,13 +9,19 @@ die() { | ||||
| H1() { | ||||
|     local msg="$1" | ||||
|     echo "----------------------------------------------" | ||||
|     echo "           $msg" | ||||
|     echo "----------------------------------------------" | ||||
|     if [ ! -z "$msg" ]; then | ||||
|         echo "           $msg" | ||||
|         echo "----------------------------------------------" | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| H2() { | ||||
|     local msg="$1" | ||||
|     echo "*** $msg ***" | ||||
|     if [ -z "$msg" ]; then | ||||
|         echo "***" | ||||
|     else | ||||
|         echo "*** $msg ***" | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| dump_log() { | ||||
| @ -25,7 +31,7 @@ dump_log() { | ||||
|     echo "" | ||||
|     echo "--------" | ||||
|     echo -n "-------- $log_file" | ||||
|     if [ -z "$lines" ]; then | ||||
|     if [ ! -z "$lines" ]; then | ||||
|         echo " (last $line lines)" | ||||
|     else | ||||
|         echo "" | ||||
| @ -39,6 +45,12 @@ dump_log() { | ||||
|     fi | ||||
| } | ||||
| 
 | ||||
| dump_conf_files() { | ||||
|     dump_log "/etc/mailinabox.conf" | ||||
|     dump_log "/etc/nsd/nsd.conf" | ||||
|     dump_log "/etc/postfix/main.cf" | ||||
| } | ||||
| 
 | ||||
| install_qa_prerequisites() { | ||||
|     # python3-dnspython: is used by the python scripts in 'tests' and is | ||||
|     #   not installed by setup | ||||
|  | ||||
| @ -113,7 +113,7 @@ detect_syslog_error() { | ||||
| 				let ec+=1 | ||||
| 				record "$F_DANGER[ERROR] $line$F_RESET" | ||||
| 			else | ||||
| 				record "[	OK] $line" | ||||
| 				record "[   OK] $line" | ||||
| 			fi | ||||
| 		done | ||||
| 		[ $ec -gt 0 ] && exit 0 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user