Debugging at lara.matcom

master
Andy Teijelo Pérez 2015-11-06 01:05:17 -05:00
parent cb5b171018
commit 111c8f9db6
1 changed files with 4 additions and 3 deletions

View File

@ -17,10 +17,10 @@ from subprocess import check_call, call
#app = Flask("ISABEL-2 Verifier") # That app name breaks Ubuntu 14.04 :-o
app = Flask("main")
app.secret_key = "6ab77f3c45447429c2ae163c260a626029519a66450e474c"
debug = True
users_file = "/etc/freeradius/users.dpto2"
dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp_hosts"
dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp-hosts"
dhcp_hosts_file = "/etc/dnsmasq.d/dpto2/dhcp-opts"
def reload_freeradius():
call("./reload_freeradius")
@ -206,6 +206,7 @@ def ips():
r = parse_dchp_host(line)
ip = int(r.ip.split(".")[-1])
ipmap[ip] = Ip(meta.get("reserved-by",""), False)
print(ipmap)
return render_template("ips.html", ipmap=ipmap)
@app.route("/ip/<int:addr>")
@ -222,5 +223,5 @@ if __name__ == '__main__':
users_file = "users.dpto2"
dhcp_hosts_file = "dhcp-hosts.dpto2"
dhcp_opts_file = "dhcp-opts.dpto2"
app.debug = True
app.debug = True
app.run(host="0.0.0.0")