create datadir on launch (#1674)

* create datadir on launch
* change makedirs to Path.mkdir
This commit is contained in:
dni ⚡
2023-05-09 10:04:27 +02:00
committed by GitHub
parent 159aa24a4e
commit 45b199a8ef
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -4,6 +4,7 @@ uvloop.install()
import multiprocessing as mp
import time
from pathlib import Path
import click
import uvicorn
@@ -37,6 +38,9 @@ def main(
):
"""Launched with `poetry run lnbits` at root level"""
# create data dir if it does not exist
Path(settings.lnbits_data_folder).mkdir(parents=True, exist_ok=True)
set_cli_settings(host=host, port=port, forwarded_allow_ips=forwarded_allow_ips)
# this beautiful beast parses all command line arguments and passes them to the uvicorn server