migrated only relevant fixes from #3770 (#3778)

* migrated only relevant fixes from #3770
* add the missing apt_install function
This commit is contained in:
Dipun Mistry 2023-05-03 18:11:03 +01:00 committed by GitHub
parent 8b9b1225ad
commit 02f0da720c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -9,6 +9,15 @@ if [ "$EUID" -ne 0 ]
exit 1
fi
apt_install() {
apt install -y ${@}
if [ $? -eq 100 ]; then
echo "FAIL! apt failed to install needed packages!"
echo ${@}
exit 1
fi
}
echo "# getting default user/repo from build_sdcard.sh"
sudo cp /home/admin/raspiblitz/build_sdcard.sh /home/admin/build_sdcard.sh
sudo chmod +x /home/admin/build_sdcard.sh 2>/dev/null
@ -48,6 +57,7 @@ sudo /home/admin/config.scripts/blitz.web.ui.sh on "${defaultWEBUIuser}" "${defa
# set build code as new www default
sudo rm -r /home/admin/assets/nginx/www_public
mkdir -p /home/admin/assets/nginx/www_public
sudo cp -a /home/blitzapi/blitz_web/build/* /home/admin/assets/nginx/www_public
sudo chown admin:admin /home/admin/assets/nginx/www_public
sudo rm -r /home/blitzapi/blitz_web/build/*

View File

@ -45,6 +45,7 @@ function buildGRPCplugin() {
echo "# delete old dir or binary"
sudo rm -rf /home/bitcoin/cl-plugins-available/cln-grpc
echo "# move to /home/bitcoin/cl-plugins-available/"
sudo mkdir -p /home/bitcoin/cl-plugins-available
sudo -u bitcoin mv /home/bitcoin/cln-grpc-build/debug/cln-grpc /home/bitcoin/cl-plugins-available/
else
echo "# - cln-grpc plugin was already built/installed"