mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
unbound: fix migration when db not enabled
This commit is contained in:
parent
a72c86466b
commit
bf0d6498fc
@ -33,7 +33,7 @@ from duckdb_helper import DbConnection
|
||||
|
||||
# export database in case the new storage version doesn't match
|
||||
with DbConnection('/var/unbound/data/unbound.duckdb', read_only=True) as db:
|
||||
if db.connection is not None:
|
||||
if db is not None:
|
||||
os.makedirs('/var/cache/unbound.duckdb', mode=0o750, exist_ok=True)
|
||||
shutil.chown('/var/cache/unbound.duckdb', 'unbound', 'unbound')
|
||||
db.connection.execute("EXPORT DATABASE '/var/cache/unbound.duckdb';")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user