mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-05 14:03:17 +02:00
fix lnbits update options (#3307)
This commit is contained in:
@@ -2,16 +2,22 @@
|
|||||||
|
|
||||||
# https://github.com/lnbits/lnbits-legend
|
# https://github.com/lnbits/lnbits-legend
|
||||||
|
|
||||||
|
# https://github.com/lnbits/lnbits-legend/releases
|
||||||
|
tag="0.9.1"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
echo "small config script to switch LNbits on or off"
|
echo "Config script to switch LNbits on or off."
|
||||||
|
echo "Installs the version ${tag} by default."
|
||||||
|
echo "Usage:"
|
||||||
echo "bonus.lnbits.sh on [lnd|tlnd|slnd|cl|tcl|scl] [?GITHUBUSER] [?BRANCH|?TAG]"
|
echo "bonus.lnbits.sh on [lnd|tlnd|slnd|cl|tcl|scl] [?GITHUBUSER] [?BRANCH|?TAG]"
|
||||||
echo "bonus.lnbits.sh switch [lnd|tlnd|slnd|cl|tcl|scl]"
|
echo "bonus.lnbits.sh switch [lnd|tlnd|slnd|cl|tcl|scl]"
|
||||||
echo "bonus.lnbits.sh off"
|
echo "bonus.lnbits.sh off"
|
||||||
echo "bonus.lnbits.sh status"
|
echo "bonus.lnbits.sh status"
|
||||||
echo "bonus.lnbits.sh menu"
|
echo "bonus.lnbits.sh menu"
|
||||||
echo "bonus.lnbits.sh prestart"
|
echo "bonus.lnbits.sh prestart"
|
||||||
echo "bonus.lnbits.sh githubsync"
|
echo "bonus.lnbits.sh repo [githubuser] [branch]"
|
||||||
|
echo "bonus.lnbits.sh sync"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -359,11 +365,11 @@ if [ "$1" = "repo" ]; then
|
|||||||
# change origin repo of lnbits code
|
# change origin repo of lnbits code
|
||||||
echo "# changing LNbits github repo(${githubUser}) branch(${githubBranch})"
|
echo "# changing LNbits github repo(${githubUser}) branch(${githubBranch})"
|
||||||
cd /home/lnbits/lnbits
|
cd /home/lnbits/lnbits
|
||||||
sudo git remote remove origin
|
sudo -u lnbits git remote remove origin
|
||||||
sudo git remote add origin ${githubRepo}
|
sudo -u lnbits git remote add origin ${githubRepo}
|
||||||
sudo git fetch
|
sudo -u lnbits git fetch
|
||||||
sudo git checkout ${githubBranch}
|
sudo -u lnbits git checkout ${githubBranch}
|
||||||
sudo git branch --set-upstream-to=origin/${githubBranch} ${githubBranch}
|
sudo -u lnbits git branch --set-upstream-to=origin/${githubBranch} ${githubBranch}
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -371,10 +377,20 @@ if [ "$1" = "sync" ] || [ "$1" = "repo" ]; then
|
|||||||
echo "# pull all changes from github repo"
|
echo "# pull all changes from github repo"
|
||||||
# output basic info
|
# output basic info
|
||||||
cd /home/lnbits/lnbits
|
cd /home/lnbits/lnbits
|
||||||
sudo git remote -v
|
sudo -u lnbits git remote -v
|
||||||
sudo git branch -v
|
sudo -u lnbits git branch -v
|
||||||
# pull latest code
|
# pull latest code
|
||||||
sudo git pull
|
sudo -u lnbits git pull
|
||||||
|
|
||||||
|
# install
|
||||||
|
sudo -u lnbits python3 -m venv venv
|
||||||
|
sudo -u lnbits ./venv/bin/pip install -r requirements.txt
|
||||||
|
sudo -u lnbits ./venv/bin/pip install pylightning
|
||||||
|
sudo -u lnbits ./venv/bin/pip install secp256k1
|
||||||
|
sudo -u lnbits ./venv/bin/pip install pyln-client
|
||||||
|
|
||||||
|
# build
|
||||||
|
sudo -u lnbits ./venv/bin/python build.py
|
||||||
# restart lnbits service
|
# restart lnbits service
|
||||||
sudo systemctl restart lnbits
|
sudo systemctl restart lnbits
|
||||||
echo "# server is restarting ... maybe takes some seconds until available"
|
echo "# server is restarting ... maybe takes some seconds until available"
|
||||||
@@ -453,8 +469,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
if [ "$3" != "" ]; then
|
if [ "$3" != "" ]; then
|
||||||
githubUser="$3"
|
githubUser="$3"
|
||||||
fi
|
fi
|
||||||
# https://github.com/lnbits/lnbits-legend/releases
|
|
||||||
tag="0.9.1"
|
|
||||||
if [ "$4" != "" ]; then
|
if [ "$4" != "" ]; then
|
||||||
tag="$4"
|
tag="$4"
|
||||||
fi
|
fi
|
||||||
@@ -490,6 +504,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo -u lnbits ./venv/bin/pip install -r requirements.txt
|
sudo -u lnbits ./venv/bin/pip install -r requirements.txt
|
||||||
sudo -u lnbits ./venv/bin/pip install pylightning
|
sudo -u lnbits ./venv/bin/pip install pylightning
|
||||||
sudo -u lnbits ./venv/bin/pip install secp256k1
|
sudo -u lnbits ./venv/bin/pip install secp256k1
|
||||||
|
sudo -u lnbits ./venv/bin/pip install pyln-client
|
||||||
|
|
||||||
# build
|
# build
|
||||||
sudo -u lnbits ./venv/bin/python build.py
|
sudo -u lnbits ./venv/bin/python build.py
|
||||||
|
Reference in New Issue
Block a user