2021-02-09 17:05:39 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
source /home/joinmarket/joinin.conf
|
|
|
|
|
source /home/joinmarket/_functions.sh
|
|
|
|
|
|
|
|
|
|
# BASIC MENU INFO
|
2021-02-09 18:33:24 +00:00
|
|
|
HEIGHT=10
|
2021-02-09 17:05:39 +00:00
|
|
|
WIDTH=58
|
|
|
|
|
CHOICE_HEIGHT=20
|
2021-02-10 21:03:24 +00:00
|
|
|
TITLE="Configuration options"
|
2021-02-09 17:05:39 +00:00
|
|
|
MENU=""
|
|
|
|
|
OPTIONS=()
|
|
|
|
|
BACKTITLE="JoininBox GUI"
|
|
|
|
|
|
|
|
|
|
# Basic Options
|
|
|
|
|
OPTIONS+=(\
|
|
|
|
|
JMCONF "Edit the joinmarket.cfg manually" \
|
2021-02-09 18:33:24 +00:00
|
|
|
RESET "Reset the joinmarket.cfg to the defaults"
|
2021-02-09 17:05:39 +00:00
|
|
|
CONNECT "Connect to a remote bitcoin node on mainnet"\
|
2021-02-09 18:33:24 +00:00
|
|
|
SIGNET "Switch to signet with a local Bitcoin Core"
|
2021-02-09 17:05:39 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
CHOICE=$(dialog --clear \
|
|
|
|
|
--backtitle "$BACKTITLE" \
|
|
|
|
|
--title "$TITLE" \
|
|
|
|
|
--menu "$MENU" \
|
|
|
|
|
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
|
|
|
|
"${OPTIONS[@]}" \
|
|
|
|
|
2>&1 >/dev/tty)
|
|
|
|
|
|
|
|
|
|
case $CHOICE in
|
|
|
|
|
JMCONF)
|
|
|
|
|
/home/joinmarket/install.joinmarket.sh config
|
|
|
|
|
echo "Returning to the menu..."
|
|
|
|
|
sleep 1
|
|
|
|
|
/home/joinmarket/menu.sh
|
|
|
|
|
;;
|
2021-02-09 18:33:24 +00:00
|
|
|
RESET)
|
|
|
|
|
echo "# Removing the joinmarket.cfg"
|
|
|
|
|
rm -f /home/joinmarket/.joinmarket/joinmarket.cfg
|
|
|
|
|
generateJMconfig
|
2021-02-09 18:36:30 +00:00
|
|
|
echo
|
|
|
|
|
echo "Press ENTER to return to the menu..."
|
|
|
|
|
read key
|
2021-02-09 18:33:24 +00:00
|
|
|
;;
|
2021-02-09 17:05:39 +00:00
|
|
|
CONNECT)
|
|
|
|
|
/home/joinmarket/install.signet.sh off
|
|
|
|
|
/home/joinmarket/menu.bitcoinrpc.sh
|
|
|
|
|
echo
|
|
|
|
|
echo "Press ENTER to return to the menu..."
|
|
|
|
|
read key
|
|
|
|
|
;;
|
|
|
|
|
SIGNET)
|
|
|
|
|
/home/joinmarket/install.signet.sh on
|
|
|
|
|
echo
|
|
|
|
|
echo "Press ENTER to return to the menu..."
|
|
|
|
|
read key
|
|
|
|
|
;;
|
|
|
|
|
esac
|