From: Giorgio Ravera Date: Mon, 16 Mar 2026 22:06:11 +0000 (+0100) Subject: minor changes to TODO X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=c2fa3f58c40dfa4c2f321b0b75ecd025021d82f6;p=network-manager.git minor changes to TODO --- diff --git a/TODO.md b/TODO.md index 3cfc4c1..ad59626 100644 --- a/TODO.md +++ b/TODO.md @@ -6,19 +6,19 @@ ### 🔄 DB management at startup - [X] **If the database is empty** - - [ ] Import initial YAML + - [ ] Import initial JSON - [X] Populate the database - [X] **If the database exists** - - [ ] Ignore YAML **unless the repository file has changed** - - [ ] If YAML has changed → update the DB + - [ ] Ignore JSON **unless the repository file has changed** + - [ ] If JSON has changed → update the DB --- ### 🛠️ Updates made by the Webapp - [X] Apply changes to the database -- [ ] Regenerate YAML from the DB +- [X] Regenerate JSON from the DB - [ ] Perform **commit + push** on Git - [ ] Regenerate **from scratch**: - [ ] **BIND (DNS)** configuration @@ -35,18 +35,6 @@ --- -### 🔍 YAML ↔ DB Periodic Consistency - -- [ ] Calculate YAML **expected checksum** -- [ ] Compare with **actual checksum** -- [ ] Determine which element has changed - -#### Synchronization rules -- [ ] YAML changed → update DB -- [ ] DB changed → regenerate YAML - ---- - ## 🧩 Configuration Generation ### 🧪 BIND (DNS) @@ -56,7 +44,7 @@ - [ ] Syntax validation (`named-checkconf`, `named-checkzone`) - [ ] Rollback management in case of errors - [ ] Update external DNS - - [ ] Dedicated file + - [X] Dedicated file - [ ] OVH - [ ] Cloudflare @@ -115,6 +103,8 @@ ### 🔧 Backup & Recovery - [X] Backup generation +- [X] Backup restore +- [ ] Backup/Restore from web - [ ] Periodic backup of SQLite DB - [ ] Remote Git repository backup - [ ] Backup of generated configurations diff --git a/backend/bootstrap.py b/backend/bootstrap.py index 4515acb..5382098 100644 --- a/backend/bootstrap.py +++ b/backend/bootstrap.py @@ -64,7 +64,7 @@ def print_goodbye(logger): # ================================ # Create DB if needed # ================================ -def docker_create_db(logger): +def create_db(logger): # Reset database if requested if settings.DB_RESET and os.path.exists(settings.DB_FILE): logger.info("Removing existing database: %s", settings.DB_FILE) @@ -95,7 +95,7 @@ def bootstrap(): print_welcome(logger) # Create or update database - docker_create_db(logger) + create_db(logger) #os.makedirs(DATA_DIR, exist_ok=True) #os.makedirs(BIND_DIR, exist_ok=True) diff --git a/backend/db/aliases.py b/backend/db/aliases.py index 3c1e2f3..65cc0b7 100644 --- a/backend/db/aliases.py +++ b/backend/db/aliases.py @@ -81,7 +81,7 @@ def add_alias(data: Dict[str, Any]) -> int: try: cur = conn.execute( """ - INSERT INTO aliases (name, target, note, ssl_enabled, visibility) + INSERT INTO aliases (name, target, note, ssl_enabled, visibility) VALUES (?, ?, ?, ?, ?) """, (