Skip to content

Commit

Permalink
Secure the DB in the /config/ directory
Browse files Browse the repository at this point in the history
  • Loading branch information
linickx committed Jun 23, 2024
1 parent 31933f0 commit 50e0016
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions admin/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
logger.info('📨 Home Assistant Notifications => %s', str(HA_NOTIFY))

# Initial Config vars.
if os.path.exists("/share/"): # <- Revert addon_configs when done.
CONFIG_DB_PATH = "/share/"
if os.path.exists("/config/"):
CONFIG_DB_PATH = "/config/"
else:
CONFIG_DB_PATH = "./" # Make config option

Expand Down
3 changes: 1 addition & 2 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Home Detector
description: A lightweight intrusion detector.
url: https://github.com/linickx/HomeDetector
version: "0.0.1"
version: "0.0.2"
slug: homedetector
init: false
arch:
Expand All @@ -10,7 +10,6 @@ arch:
startup: application
map:
- addon_config:rw
- share:rw
ports:
10053/tcp: 53
10053/udp: 53
Expand Down
4 changes: 2 additions & 2 deletions dns/listener.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@
]

# Initial Config vars.
if os.path.exists("/share/"): # <- Should be addon_configs .
CONFIG_DB_PATH = "/share/"
if os.path.exists("/config/"):
CONFIG_DB_PATH = "/config/"
else:
CONFIG_DB_PATH = "./" # Make config option

Expand Down

0 comments on commit 50e0016

Please sign in to comment.