mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-23 21:18:07 +00:00
Add electrs to mynode-install-extra
This commit is contained in:
parent
4c49b1ec08
commit
a9d9411082
|
@ -7,7 +7,7 @@ source /usr/share/mynode/mynode_config.sh
|
|||
source /usr/share/mynode/mynode_app_versions.sh
|
||||
|
||||
# Make sure we have an app argument
|
||||
if [ "$#" -ne 1 ]; then
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "Usage: mynode-install-extra <app_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -22,6 +22,24 @@ APP="$1"
|
|||
if [ "$APP" = "rust" ] || [ "$APP" = "cargo" ]; then
|
||||
wget https://sh.rustup.rs -O /tmp/setup_rust.sh
|
||||
/bin/bash /tmp/setup_rust.sh -y
|
||||
elif [ "$APP" = "electrs" ]; then
|
||||
mkdir -p /home/admin/download
|
||||
cd /home/admin/download
|
||||
rm -rf electrs-*.tar.gz
|
||||
rm -rf electrs
|
||||
|
||||
URL="https://github.com/romanz/electrs/archive/refs/tags/v0.9.2.tar.gz"
|
||||
if [ "$#" -eq 2 ]; then
|
||||
URL="$2"
|
||||
fi
|
||||
wget $URL -O electrs.tar.gz
|
||||
tar -xvf electrs.tar.gz
|
||||
mv electrs-* electrs
|
||||
|
||||
cd electrs
|
||||
cargo build --release
|
||||
sudo install -g root -o root target/release/electrs /usr/bin/electrs
|
||||
cd ~
|
||||
else
|
||||
echo "Dont know what to do for app: $APP"
|
||||
exit
|
||||
|
|
|
@ -507,28 +507,7 @@ fi
|
|||
cd ~
|
||||
|
||||
|
||||
# Upgrade electrs
|
||||
# ELECTRS_UPGRADE_URL=https://github.com/romanz/electrs/archive/$ELECTRS_VERSION.tar.gz
|
||||
# CURRENT=""
|
||||
# if [ -f $ELECTRS_VERSION_FILE ]; then
|
||||
# CURRENT=$(cat $ELECTRS_VERSION_FILE)
|
||||
# fi
|
||||
# if [ "$CURRENT" != "$ELECTRS_VERSION" ]; then
|
||||
# cd /opt/mynode
|
||||
# rm -rf electrs
|
||||
|
||||
# rm -f electrs.tar.gz
|
||||
# wget $ELECTRS_UPGRADE_URL -O electrs.tar.gz
|
||||
# tar -xzf electrs.tar.gz
|
||||
# rm -f electrs.tar.gz
|
||||
# mv electrs-* electrs
|
||||
|
||||
# cd electrs
|
||||
# cargo build --release
|
||||
# install -g root -o root target/release/electrs /usr/bin/electrs
|
||||
# echo $ELECTRS_VERSION > $ELECTRS_VERSION_FILE
|
||||
# fi
|
||||
# cd ~
|
||||
# Upgrade electrs (just mark version, included in overlay)
|
||||
echo $ELECTRS_VERSION > $ELECTRS_VERSION_FILE
|
||||
|
||||
|
||||
|
|
|
@ -549,28 +549,7 @@ fi
|
|||
cd ~
|
||||
|
||||
|
||||
# Install Electrs (only build to save new version, now included in overlay)
|
||||
# ELECTRS_UPGRADE_URL=https://github.com/romanz/electrs/archive/$ELECTRS_VERSION.tar.gz
|
||||
# CURRENT=""
|
||||
# if [ -f $ELECTRS_VERSION_FILE ]; then
|
||||
# CURRENT=$(cat $ELECTRS_VERSION_FILE)
|
||||
# fi
|
||||
# if [ "$CURRENT" != "$ELECTRS_VERSION" ]; then
|
||||
# cd /opt/mynode
|
||||
# rm -rf electrs
|
||||
|
||||
# rm -f electrs.tar.gz
|
||||
# wget $ELECTRS_UPGRADE_URL -O electrs.tar.gz
|
||||
# tar -xzf electrs.tar.gz
|
||||
# rm -f electrs.tar.gz
|
||||
# mv electrs-* electrs
|
||||
|
||||
# cd electrs
|
||||
# cargo build --release
|
||||
# install -g root -o root target/release/electrs /usr/bin/electrs
|
||||
# echo $ELECTRS_VERSION > $ELECTRS_VERSION_FILE
|
||||
# fi
|
||||
# cd ~
|
||||
# Install Electrs (just mark version, now included in overlay)
|
||||
echo $ELECTRS_VERSION > $ELECTRS_VERSION_FILE
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user