1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2024-12-24 07:37:04 +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:
David Duque 2020-07-14 11:51:25 +01:00
parent b562e7eefa
commit 515a74ba11
No known key found for this signature in database
GPG Key ID: 2F327738A3C0AE3A
3 changed files with 4 additions and 3 deletions

View File

@ -101,9 +101,12 @@ def index():
utils.fix_boto() # must call prior to importing boto
import boto.s3
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',
hostname=env['PRIMARY_HOSTNAME'],
distname=lsb[lsb.find("\t")+1:-1],
storage_root=env['STORAGE_ROOT'],
no_users_exist=no_users_exist,

View File

@ -180,7 +180,7 @@
<hr>
<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>
</footer>
</div> <!-- /container -->

View File

@ -18,8 +18,6 @@ if [ "$OS" != "Debian GNU/Linux 10 (buster)" -a "$OS" != "Ubuntu 20.04 LTS" ]; t
exit 1
fi
sed -i "s|!!___DIST_TAG___!!|${OS}|g" management/templates/index.html
# Check that we have enough memory.
#
# /proc/meminfo reports free memory in kibibytes. Our baseline will be 512 MB,