* fix missing dependencies
* LNBits SQLite to PostgreSQL migration (#3411)
* LNBits SQLite to PostgreSQL migration
New installations with PostgreSQL configuration, existent data with SQLite.
convert script needs a full start of LNBits prior migrating the old sqlite db's.
User can migrate from raspiblitz menu.
* only fix postgres if it needs to
check for symbolik link of postgres default directory or desired postgres folder
btcpayserver and lnbits could use postgresql
new script to install or uninstall postgresql
* fix typos
* silent apt remove
* fix removed function postgresConfig
call bonus.postgresql.sh to setup PostgreSQL
* Support outdated installation
old installations should upgrade to new tag first
create new data directory /mnt/hdd/app-data/LNBits/data
* Improve migration
Make it a bit more user friendly and prepare for a worst case to revert the migration if something fails unexpectedly
make use of sync method for preparation
* Rework migration workflow
Cant wait for lnbits to start when ExecStartPre is used.
We need a full start of lnbits prior migration, so make use of lsof to check for ports and wait.
dont forget to start postgres service after installation. dont forget to stop postgres after uninstall
* Dont overwrite the backup file
if we start migrate again, the sqlite backup should not be overwritten with postgres data. Keep the backup file.
* add migrate message to menu
add the hint to revert migration manually after migrate script executed
* fix install and data directory
lnbits always needs a data directory
* clean up lnbits settings for migration
even if postgresql is already running, we can extract sqlite backup and start migrate
remove migrateMsg duplicate
* preserve database for reflash
drop database only for migrate, not for regular installations
* set blitz config for LNBits
fix drop database only for migrate, not for regular installations
* Add confirmation dialog and automatic revert
User needs to confirm the process, this will eliminate missclicks
add a migrate revert function to automatically revert if something unexpected happens
let the user call the function manually
* check conv.py on success or revert
if the conversion script fails, revert automatically
* Improve revert message
Do not print the revert hint message if current database is SQLite
* fix read config LNBitsDB
* fix unpack backup
Folder LNBits should never block the restore of backup. Happened after multiple migrations and revert.
* Wait for lnbits v0.9.5
Set commit version with fix for postgresql database and BIGINT for amounts for migrate
Can be set to v0.9.5 tag or above later
* improve migrate backup handling
revert to the current backup and not to the previous backup.
No need for the failed folder state
user message with backup file path
* check psql version once
* supress expected errors
if database exists
Co-authored-by: /rootzoll <christian@geektank.de>
* fix error output on status
Co-authored-by: ChuckNorrison <2964146+ChuckNorrison@users.noreply.github.com>
Bumps the default branch of `build_sdcard.sh` to v1.8 as following the build instructions on the 1.8 branch currently installs 1.7.2 which might be confusing.
* blitzapi: add dedicated user and conf entry
* blitzapi: add to sudo group, allow systemd access
* store blitz_we code under /home/blitzapi
* add SERVICES menu option for Blitz API and webUI
* blitz.passwords: allow non-sudo to check passwords
* change blitz_web path
* blitzapi: fix SERVICES menu entry
* add 99lndRepairMenu.sh
* add more lnd checks and improve output
* add sudo to syncAndCheckLND
* add ${netprefix} to lnd service
* restore seed and scb separately
* update lnd proto files
* lnd.initwallet: add unlock method
* lndrepair: use recovery window with unlock
* change all rpc_pb2 to lightning_pb2
* mainnet -> ${chain}net
* _provison.setup: restore SCB separately
* clear up the placement of channel.backup
* unloc kLND before SCB restore
* provison.setup: add more logging
* lnd.install: make sure bitcoin is in debian-tor
* lndRepairMenu: add RETRYSCB option
* wait to create macaroons for 2 minutes
* lndRepairMenu: add RESCAN option