remove extensions dir completly, create it on startup (#1778)

* remove extensions dir compleltly, and create it on server.py start

* also ignore symlinks
This commit is contained in:
dni ⚡ 2023-07-18 13:46:50 +02:00 committed by GitHub
parent 213be79aaa
commit 153e22fb54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

2
.gitignore vendored
View File

@ -47,5 +47,5 @@ fly.toml
lnbits-backup.zip
# Ignore extensions (post installable extension PR)
extensions/
extensions
upgrades/

View File

@ -41,6 +41,9 @@ def main(
# create data dir if it does not exist
Path(settings.lnbits_data_folder).mkdir(parents=True, exist_ok=True)
# create extension dir if it does not exist
Path(settings.lnbits_path, "extensions").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