/data and /tmp standarization

This commit is contained in:
Adam Outler
2025-11-04 22:26:35 +00:00
parent 90a07c61eb
commit 5b871865db
250 changed files with 7462 additions and 4940 deletions

View File

@@ -1,7 +1,12 @@
import sqlite3
import os
# Connect to the database
conn = sqlite3.connect("/app/db/app.db")
# Connect to the database using environment variable
db_path = os.path.join(
os.getenv('NETALERTX_DB', '/data/db'),
'app.db'
)
conn = sqlite3.connect(db_path)
cursor = conn.cursor()
# Get the names of all tables (excluding SQLite internal tables)