raspiblitz/home.admin/config.scripts
/rootzoll d7d1c40866
#3505 lnbits PostgresSQl migration finalization (#3507)
* 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>
2022-12-10 00:04:15 +01:00
..
lndlibs Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
bitcoin.install.sh fix bitcoin aliases, whitespaces and comments (#3483) 2022-12-07 20:39:28 +01:00
bitcoin.monitor.sh feat: add I2P (#3330) 2022-12-07 20:26:10 +01:00
bitcoin.update.sh fix(bitcon.update): unary operator expected (#3365) 2022-11-15 16:39:23 +01:00
blitz.backupdevice.sh Update blitz.backupdevice.sh (#3467) (#3471) 2022-11-22 21:59:17 +01:00
blitz.bootdrive.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
blitz.conf.sh #3334 add update also cache with new list values 2022-09-28 14:44:58 +02:00
blitz.configcheck.py
blitz.copychain.sh Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
blitz.datadrive.sh Improve localIP assignment and SSD detection (#3439) 2022-12-08 12:20:00 +01:00
blitz.debug.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
blitz.display.sh run blitz.display.sh with sudo (#2957) 2022-02-13 13:23:34 +01:00
blitz.docker.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
blitz.error.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
blitz.git-verify.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
blitz.github.sh Improve Patch command (#3130) 2022-05-18 22:02:37 +02:00
blitz.gpio.py #1265 Display Refactor (#2149) 2021-04-08 00:02:57 +02:00
blitz.hardware.sh merging pre-1.7.1 (#2462) 2021-08-04 00:18:30 +02:00
blitz.i2pd.sh feat: add I2P (#3330) 2022-12-07 20:26:10 +01:00
blitz.migration.sh Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
blitz.mnemonic.py #2839 return seedwords and add6x4 in new function 2021-12-23 17:25:17 +00:00
blitz.notify.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
blitz.passwords.sh #3313 & #3230 lndg final (#3506) 2022-12-09 21:49:44 +01:00
blitz.preparerelease.sh make blitzapi value survive release cleaning 2022-06-30 00:31:10 +02:00
blitz.sendnotification.py Merge branch 'fix-notify' of https://github.com/frennkie/raspiblitz into frennkie-fix-notify 2021-09-14 12:58:23 +02:00
blitz.setconf.sh use trap to delete tempfiles on exit 2021-09-02 11:34:30 +01:00
blitz.shutdown.sh #3313 & #3230 lndg final (#3506) 2022-12-09 21:49:44 +01:00
blitz.ssh.sh fix ssh restore 2022-01-28 14:32:07 +01:00
blitz.subscriptions.ip2tor.py make lnd.credentials.sh work for all chains (#3219) 2022-07-12 14:08:41 +02:00
blitz.subscriptions.letsencrypt.py #2271 deactivate DYNU from the menu 2021-09-22 23:31:08 +02:00
blitz.subscriptions.py #2348 creating onion services on demand 2022-02-17 12:22:39 +01:00
blitz.systemd.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
blitz.touchscreen.sh add LND repair menu (#2833) 2022-01-04 20:08:38 +01:00
blitz.upload.sh Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
blitz.ups.sh Add support for X708 UPS HAT (#3087) 2022-09-28 17:13:54 +02:00
blitz.web.api.sh allow code update from different branch (#3480) 2022-11-27 15:01:26 +01:00
blitz.web.sh fix syntax error seen during sd card build 2022-06-29 01:21:16 +02:00
blitz.web.ui.sh show localip after install webui (#3496) 2022-12-08 00:58:12 +01:00
blitz.zram.sh add ZRAM (#3102) 2022-05-17 16:18:30 +02:00
bonus.alby.sh #3125 activate lnd rest tor service when default 2022-06-01 23:38:17 +02:00
bonus.angular_cli.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
bonus.bitcoinminds.sh #2933 make sure nodejs is installed 2022-02-10 22:01:26 +01:00
bonus.bos.sh bos-telegram as service (#3446) 2022-12-08 23:10:58 +01:00
bonus.btc-rpc-explorer.sh Fix localIP and torAddress gathering (#3388) 2022-11-04 15:07:57 +00:00
bonus.btcpayserver.sh #3505 lnbits PostgresSQl migration finalization (#3507) 2022-12-10 00:04:15 +01:00
bonus.chantools.sh chantools update to v0.10.5 (#3347) 2022-11-15 21:55:25 +01:00
bonus.circuitbreaker.sh #3376 update circuitbreaker v0.3.2 (#3479) 2022-11-26 23:19:20 +01:00
bonus.ckbunker.sh fix deprecated options for nginx #3223 2022-07-15 17:33:52 +01:00
bonus.electrs.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
bonus.faraday.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
bonus.fulcrum.sh fulcrum: use ufw delete instead of deny 2022-11-04 14:42:09 +00:00
bonus.fullynoded.sh run blitz.display.sh with sudo (#2957) 2022-02-13 13:23:34 +01:00
bonus.go.sh go update to v1.18.7 2022-10-18 14:28:56 +01:00
bonus.helipad.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
bonus.homer.sh homer fix missing local IP in menu (#3448) 2022-11-16 16:54:52 +01:00
bonus.itchysats.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
bonus.jam.sh Jam fix (#3321) 2022-11-01 15:47:54 +00:00
bonus.joinmarket.sh Jam fix (#3321) 2022-11-01 15:47:54 +00:00
bonus.kindle-display.sh make new scripts use blitz.conf.sh 2021-12-18 00:38:49 +01:00
bonus.letsencrypt.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
bonus.lightningtipbot.sh New Feature LightningTipBot (#3445) 2022-12-08 21:33:27 +01:00
bonus.lit.sh lnd update to v0.15.5-beta, litd update and LNC fix (#3490) 2022-12-06 17:46:22 +01:00
bonus.lnbits.sh #3505 lnbits PostgresSQl migration finalization (#3507) 2022-12-10 00:04:15 +01:00
bonus.lndconnect.sh Use special bonus script to show alby connection details (#3125) 2022-06-01 23:07:38 +02:00
bonus.lndg.sh #3313 & #3230 lndg final (#3506) 2022-12-09 21:49:44 +01:00
bonus.lndmanage.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
bonus.loop.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
bonus.mempool.sh mempool change logger from debug to info (#3426) 2022-11-09 11:00:17 +01:00
bonus.nodejs.sh fix bitcoin aliases, whitespaces and comments (#3483) 2022-12-07 20:39:28 +01:00
bonus.pool.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
bonus.postgresql.sh #3505 lnbits PostgresSQl migration finalization (#3507) 2022-12-10 00:04:15 +01:00
bonus.pyblock.sh pyblock -y on install packages 2022-07-27 07:40:23 +02:00
bonus.rtl.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
bonus.specter.sh Apiscripts (#3093) 2022-05-05 10:59:50 +02:00
bonus.sphinxrelay.sh fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
bonus.squeaknode.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
bonus.stacking-sats-kraken.sh allow more than one config, also complementing a base config (#3198) 2022-06-30 21:09:30 +02:00
bonus.suez.sh suez update to support parallel CLN channels 2022-05-04 09:46:25 +01:00
bonus.tallycoin-connect.sh run blitz.display.sh with sudo (#2957) 2022-02-13 13:23:34 +01:00
bonus.telegraf.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
bonus.template.sh fix deprecated options for nginx #3223 2022-07-15 17:33:52 +01:00
bonus.thunderhub.sh thunderhub to v0.13.16 w DISABLE_BALANCE_PUSHES (#3416) 2022-11-09 19:36:02 +00:00
bonus.typescript.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
bonus.whitepaper.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
bonus.zerotier.sh make lnd.credentials.sh work for all chains (#3219) 2022-07-12 14:08:41 +02:00
cl-plugin.backup.sh CLN 22.11 update (#3474) 2022-11-27 15:51:57 +00:00
cl-plugin.clboss.sh clboss: add warning on install (#3210) 2022-07-07 10:52:33 +02:00
cl-plugin.cln-grpc.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
cl-plugin.feeadjuster.sh Core Lightning renamings 2022-07-27 08:37:36 +02:00
cl-plugin.http.sh #3427 sd card clean bloat (#3495) 2022-12-06 17:25:06 +01:00
cl-plugin.sparko.sh Improve localIP assignment and SSD detection (#3439) 2022-12-08 12:20:00 +01:00
cl-plugin.standard-python.sh Core Lightning renamings 2022-07-27 08:37:36 +02:00
cl-plugin.summary.sh Core Lightning renamings 2022-07-27 08:37:36 +02:00
cl-plugin.watchtower-client.sh Merge CL Watchtower #3394 (#3501) 2022-12-08 12:56:30 +01:00
cl.backup.sh CLN update to v22.11, install and update fixes (#3487) 2022-12-08 00:29:00 +01:00
cl.check.sh add CLN lightning-rpc access for blitzapi 2022-07-23 12:34:33 +01:00
cl.hsmtool.sh CLN update to v22.11, install and update fixes (#3487) 2022-12-08 00:29:00 +01:00
cl.install-service.sh Core Lightning renamings 2022-07-27 08:37:36 +02:00
cl.install.sh CLN update to v22.11, install and update fixes (#3487) 2022-12-08 00:29:00 +01:00
cl.monitor.sh #2691 detect locked c-lightning wallet from logs 2022-02-09 14:31:23 +00:00
cl.rest.sh Improve localIP assignment and SSD detection (#3439) 2022-12-08 12:20:00 +01:00
cl.setname.sh Core Lightning renamings 2022-07-27 08:37:36 +02:00
cl.spark.sh Improve localIP assignment and SSD detection (#3439) 2022-12-08 12:20:00 +01:00
cl.update.sh Update cl.update.sh menu entries (#3459) 2022-11-21 20:15:59 +01:00
dropbox.upload.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
internet.dns.sh add terning off option to dns config 2022-01-30 17:19:25 +01:00
internet.dyndomain.sh script doc fix 2022-11-15 21:41:06 +01:00
internet.selfsignedcert.sh Improve localIP assignment and SSD detection (#3439) 2022-12-08 12:20:00 +01:00
internet.sh #2805 fix calling tor status 2021-12-16 21:10:00 +01:00
internet.sshtunnel.py Merge branch 'v1.7' into dev 2021-08-27 10:08:58 +02:00
internet.wifi.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.autopilot.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.autounlock.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.backup.sh Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
lnd.balance.sh Calculate LN amounts in lnd.balance.sh using msats (#3336) 2022-10-06 16:47:38 +02:00
lnd.channels.sh clean more old litecoin references 2021-12-09 14:08:04 +01:00
lnd.check.sh lnd.check.sh -> harden rpc user/pass parsing against double entries (#3282) 2022-09-29 21:03:48 +02:00
lnd.compact.sh fix manual lnd database compacting 2022-05-28 10:15:21 +01:00
lnd.credentials.sh make lnd.credentials.sh work for all chains (#3219) 2022-07-12 14:08:41 +02:00
lnd.export.sh Scp refactor (#3206) 2022-09-29 20:56:23 +02:00
lnd.fwdreport.sh fix syntax 2022-05-17 19:06:34 +02:00
lnd.initwallet.py fix error messages using exclamation marks (#3232) 2022-07-18 22:07:14 +02:00
lnd.install.sh lnd update to v0.15.5-beta, litd update and LNC fix (#3490) 2022-12-06 17:46:22 +01:00
lnd.keysend.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.monitor.sh Refactor Repair & Recovery Options #2901 (#2910) 2022-01-25 12:07:11 +01:00
lnd.setaddress.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.setname.sh Refactor Repair & Recovery Options #2901 (#2910) 2022-01-25 12:07:11 +01:00
lnd.setport.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
lnd.tlscert.sh #584 cleaned up dyndomain and tls cert (#1574) 2020-09-22 02:51:34 +02:00
lnd.unlock.sh fix lnd unlock when second option 2022-06-06 00:27:34 +02:00
lnd.update.sh set LANG=en_US.utf8 with grep 'Good signature' (#3183) 2022-06-28 18:49:03 +02:00
network.aliases.sh fix bitcoin aliases, whitespaces and comments (#3483) 2022-12-07 20:39:28 +01:00
network.chain.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
network.reindex.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
network.txindex.sh txindex: only restart bitcoind when running (#1831) 2021-03-18 23:14:05 +01:00
network.upnp.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
network.wallet.sh big merge of 2388redis & 2669tor (#2790) 2021-12-14 23:34:35 +01:00
nextcloud.upload.sh #3116 fix escapes 2022-06-02 17:09:03 +02:00
tor.install.sh add clearnet fallback for tor keys 2022-08-15 21:14:10 +01:00
tor.network.sh #3313 & #3230 lndg final (#3506) 2022-12-09 21:49:44 +01:00
tor.onion-service.sh fix tor.onion-service error removing empty lines 2022-05-28 19:42:41 +01:00