2020-09-09 11:20:41 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
2020-10-14 10:08:23 +01:00
|
|
|
source /home/joinmarket/_functions.sh
|
2020-09-09 11:20:41 +01:00
|
|
|
|
|
|
|
|
# BASIC MENU INFO
|
2023-12-11 08:50:42 +01:00
|
|
|
HEIGHT=15
|
2024-03-10 20:39:14 +00:00
|
|
|
WIDTH=57
|
2023-12-11 08:50:42 +01:00
|
|
|
CHOICE_HEIGHT=4
|
2020-10-14 09:39:28 +01:00
|
|
|
TITLE="Update options"
|
2020-10-17 21:52:32 +01:00
|
|
|
MENU="
|
2023-12-11 08:50:42 +01:00
|
|
|
Installed versions:
|
|
|
|
|
JoininBox $currentJBcommit
|
|
|
|
|
JoinMarket $currentJMversion
|
|
|
|
|
$currentBTCversion"
|
2020-09-09 11:20:41 +01:00
|
|
|
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"
|
2023-12-11 08:50:42 +01:00
|
|
|
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")
|
|
|
|
|
|
2020-09-09 11:20:41 +01:00
|
|
|
CHOICE=$(dialog --clear \
|
|
|
|
|
--backtitle "$BACKTITLE" \
|
|
|
|
|
--title "$TITLE" \
|
2021-03-04 11:21:57 +00:00
|
|
|
--ok-label "Select" \
|
|
|
|
|
--cancel-label "Back" \
|
2020-09-09 11:20:41 +01:00
|
|
|
--menu "$MENU" \
|
|
|
|
|
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
|
|
|
|
"${OPTIONS[@]}" \
|
|
|
|
|
2>&1 >/dev/tty)
|
|
|
|
|
|
|
|
|
|
case $CHOICE in
|
|
|
|
|
JOININBOX)
|
|
|
|
|
updateJoininBox
|
2020-10-28 12:29:11 +00:00
|
|
|
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;;
|
2020-09-09 11:20:41 +01:00
|
|
|
JOINMARKET)
|
2022-04-10 09:16:43 +01:00
|
|
|
/home/joinmarket/install.joinmarket.sh -i update
|
2021-12-07 08:10:50 +00:00
|
|
|
errorOnInstall $?
|
2020-11-27 23:36:05 +00:00
|
|
|
echo
|
2021-12-08 09:00:37 +00:00
|
|
|
menu_resetJMconfig
|
2021-12-07 08:10:50 +00:00
|
|
|
if [ -f /home/bitcoin/.bitcoin/bitcoin.conf ];then
|
2021-12-08 09:00:37 +00:00
|
|
|
menu_connectLocalCore
|
2021-12-07 08:10:50 +00:00
|
|
|
fi
|
2021-12-02 08:58:50 +00:00
|
|
|
echo
|
2020-09-11 18:03:26 +01:00
|
|
|
echo "Press ENTER to return to the menu"
|
2021-03-21 00:32:41 +00:00
|
|
|
read key;;
|
2023-12-11 08:50:42 +01:00
|
|
|
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;;
|
2020-09-09 11:20:41 +01:00
|
|
|
esac
|