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