mirror of
https://github.com/bunkerity/bunkerweb
synced 2026-05-24 09:28:37 +00:00
Fix bunkernet-ip.list file not being created in case of an error (same as 1.4)
This commit is contained in:
parent
c8d39ba6b5
commit
cb808c0ad1
1 changed files with 4 additions and 0 deletions
|
|
@ -52,6 +52,10 @@ try:
|
|||
# Create directory if it doesn't exist
|
||||
Path("/var/cache/bunkerweb/bunkernet").mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Create empty file in case it doesn't exist
|
||||
if not Path("/var/tmp/bunkerweb/bunkernet-ip.list").is_file():
|
||||
Path("/var/tmp/bunkerweb/bunkernet-ip.list").write_bytes(b"")
|
||||
|
||||
# Check if ID is present
|
||||
if not Path("/var/cache/bunkerweb/bunkernet/instance.id").is_file():
|
||||
logger.error(
|
||||
|
|
|
|||
Loading…
Reference in a new issue