From 87c5b1867511f538ba44f57b50276eec533ccb44 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 27 Sep 2011 18:23:45 +0200 Subject: added simple check for mantainance/offline message --- index.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'index.py') diff --git a/index.py b/index.py index 44acc74..38ee86b 100755 --- a/index.py +++ b/index.py @@ -1,11 +1,10 @@ #!/usr/bin/env python -import sys -sys.path += ['/usr/lib/mailman'] - +import sys, os, re from web import template, form, application, ctx, wsgi, config from socket import gethostbyaddr, gethostbyname -import re + +sys.path += ['/usr/lib/mailman'] import Mailman.Utils valid_ips = [ @@ -61,7 +60,8 @@ create_form = form.Form( class index: def GET(self): - return render.index() + running = not os.path.exists('./offline') + return render.index(running) class spam: def GET(self): -- cgit v1.2.3-1-g7c22