0a18b94d84
- Flask + SQLite web app with user authentication - Zone management: create/delete zones, edit raw zone files - Record management: add/delete A/AAAA/CNAME/MX/TXT/NS/PTR/SRV/CAA records - Service control: start/stop/restart/reload BIND via systemctl/rndc - Configuration editor: edit named.conf.options/local with syntax validation - DNS query testing: online dig tool - Audit log: all operations logged with user/timestamp - BIND9 backend, listening on port 53
13 lines
380 B
Python
13 lines
380 B
Python
import os
|
|
os.makedirs(os.path.join(os.path.dirname(__file__), "instance"), exist_ok=True)
|
|
|
|
from app import app, db, seed_admin
|
|
|
|
# Initialize DB - safe for multi-worker gunicorn
|
|
with app.app_context():
|
|
try:
|
|
db.create_all()
|
|
seed_admin()
|
|
except Exception as e:
|
|
print(f"[wsgi] DB init: {e} (likely race condition with another worker, safe to ignore)")
|