joininbox/scripts/menu.update.sh

69 lines
1.7 KiB
Bash
Raw Permalink Normal View History

#!/bin/bash
2020-10-14 10:08:23 +01:00
source /home/joinmarket/_functions.sh
# BASIC MENU INFO
HEIGHT=15
WIDTH=57
CHOICE_HEIGHT=4
2020-10-14 09:39:28 +01:00
TITLE="Update options"
MENU="
Installed versions:
JoininBox $currentJBcommit
JoinMarket $currentJMversion
$currentBTCversion"
OPTIONS=()
BACKTITLE="JoininBox GUI"
# Basic Options
2021-03-02 10:30:40 +00:00
OPTIONS+=(
2021-03-21 00:32:41 +00:00
JOININBOX "Update the JoininBox scripts and menu"
JOINMARKET "Update/reinstall JoinMarket to $(grep testedJMversion= < ~/install.joinmarket.sh | cut -d '"' -f 2)")
if [ "$runningEnv" = "standalone" ]; then
OPTIONS+=(\
BITCOIN "Update Bitcoin Core to a chosen version")
fi
OPTIONS+=(\
2021-03-21 00:32:41 +00:00
ADVANCED "Advanced update options")
CHOICE=$(dialog --clear \
--backtitle "$BACKTITLE" \
--title "$TITLE" \
--ok-label "Select" \
--cancel-label "Back" \
--menu "$MENU" \
$HEIGHT $WIDTH $CHOICE_HEIGHT \
"${OPTIONS[@]}" \
2>&1 >/dev/tty)
case $CHOICE in
JOININBOX)
updateJoininBox
errorOnInstall $?
2020-11-27 23:36:05 +00:00
echo
2020-09-09 11:52:35 +01:00
echo "Press ENTER to return to the menu"
2021-03-21 00:32:41 +00:00
read key;;
JOINMARKET)
/home/joinmarket/install.joinmarket.sh -i update
errorOnInstall $?
2020-11-27 23:36:05 +00:00
echo
2021-12-08 09:00:37 +00:00
menu_resetJMconfig
if [ -f /home/bitcoin/.bitcoin/bitcoin.conf ];then
2021-12-08 09:00:37 +00:00
menu_connectLocalCore
fi
echo
echo "Press ENTER to return to the menu"
2021-03-21 00:32:41 +00:00
read key;;
BITCOIN)
/home/joinmarket/standalone/bitcoin.update.sh custom
errorOnInstall $?
echo
echo "# Start bitcoind .. "
sudo systemctl start bitcoind
echo "# Monitoring the bitcoind logs .. "
showBitcoinLogs;;
2020-11-27 23:36:05 +00:00
ADVANCED)
2021-03-21 00:32:41 +00:00
/home/joinmarket/menu.update.advanced.sh;;
esac