mirror of
				https://github.com/mail-in-a-box/mailinabox.git
				synced 2025-10-30 18:50:53 +00:00 
			
		
		
		
	Render the lsb_release at flask init time
Don't change the index.html file at setup time
This commit is contained in:
		
							parent
							
								
									b562e7eefa
								
							
						
					
					
						commit
						515a74ba11
					
				| @ -101,9 +101,12 @@ def index(): | |||||||
| 	utils.fix_boto() # must call prior to importing boto | 	utils.fix_boto() # must call prior to importing boto | ||||||
| 	import boto.s3 | 	import boto.s3 | ||||||
| 	backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()] | 	backup_s3_hosts = [(r.name, r.endpoint) for r in boto.s3.regions()] | ||||||
|  | 	lsb=utils.shell("check_output", ["/usr/bin/lsb_release", "-d"]) | ||||||
| 
 | 
 | ||||||
| 	return render_template('index.html', | 	return render_template('index.html', | ||||||
| 		hostname=env['PRIMARY_HOSTNAME'], | 		hostname=env['PRIMARY_HOSTNAME'], | ||||||
|  | 		distname=lsb[lsb.find("\t")+1:-1], | ||||||
|  | 		 | ||||||
| 		storage_root=env['STORAGE_ROOT'], | 		storage_root=env['STORAGE_ROOT'], | ||||||
| 
 | 
 | ||||||
| 		no_users_exist=no_users_exist, | 		no_users_exist=no_users_exist, | ||||||
|  | |||||||
| @ -180,7 +180,7 @@ | |||||||
| 		<hr> | 		<hr> | ||||||
| 
 | 
 | ||||||
| 		<footer> | 		<footer> | ||||||
| 			<p>This is a <a href="https://github.com/ddavness/power-mailinabox">Power Mail-in-a-Box</a>, using !!___DIST_TAG___!! | 			<p>This is a <a href="https://github.com/ddavness/power-mailinabox">Power Mail-in-a-Box</a> - {{distname}} | ||||||
| 			</p> | 			</p> | ||||||
| 		</footer> | 		</footer> | ||||||
| 	</div> <!-- /container --> | 	</div> <!-- /container --> | ||||||
|  | |||||||
| @ -18,8 +18,6 @@ if [ "$OS" != "Debian GNU/Linux 10 (buster)" -a "$OS" != "Ubuntu 20.04 LTS" ]; t | |||||||
| 	exit 1 | 	exit 1 | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
| sed -i "s|!!___DIST_TAG___!!|${OS}|g" management/templates/index.html |  | ||||||
| 
 |  | ||||||
| # Check that we have enough memory. | # Check that we have enough memory. | ||||||
| # | # | ||||||
| # /proc/meminfo reports free memory in kibibytes. Our baseline will be 512 MB, | # /proc/meminfo reports free memory in kibibytes. Our baseline will be 512 MB, | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user