From f7b0eb217a0324e78cd9945340650fa97c17bfb5 Mon Sep 17 00:00:00 2001 From: nahuhh Date: Mon, 12 Feb 2024 17:57:48 -0500 Subject: [PATCH] bsx-removecoin + fixes --- bsx-removecoin | 4 ++++ bsx/addcoin.sh | 7 +++---- bsx/removecoin.sh | 10 ++++++++++ bsx/upgradecoins.sh | 6 +++--- install.sh | 2 +- 5 files changed, 21 insertions(+), 8 deletions(-) create mode 100755 bsx-removecoin create mode 100755 bsx/removecoin.sh diff --git a/bsx-removecoin b/bsx-removecoin new file mode 100755 index 0000000..dfba901 --- /dev/null +++ b/bsx-removecoin @@ -0,0 +1,4 @@ +#!/bin/bash +export SWAP_DATADIR=$HOME/coinswaps +. $SWAP_DATADIR/venv/bin/activate && python -V +/usr/local/bin/bsx/disablecoin.sh diff --git a/bsx/addcoin.sh b/bsx/addcoin.sh index 0184b77..9f1140d 100755 --- a/bsx/addcoin.sh +++ b/bsx/addcoin.sh @@ -1,7 +1,7 @@ #!/bin/bash ## Prompt for user input -echo -e "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\nfiro\nlitecoin\nparticl\nPIVX\n" +echo -e "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\nfiro\nlitecoin\nparticl\npivx\n" read -p 'Full name of coin to add [example: litecoin] ' addcoin ## Confirm echo -e "\nAdd $addcoin to your BasicSwap install, correct? Press any key to continue. CTRL-C to exit" @@ -16,13 +16,12 @@ if [ $addcoin = bitcoin ]; then esac if [ $confirmed = yes ]; then - echo using btcfastsync + echo "Using btcfastsync" basicswap-prepare --usebtcfastsync --datadir=/$SWAP_DATADIR --addcoin=$addcoin else - echo "not using btcfastsync" + echo "Not using btcfastsync" basicswap-prepare --datadir=/$SWAP_DATADIR --addcoin=$addcoin fi else - echo "not using bitcoin, using $addcoin" basicswap-prepare --datadir=/$SWAP_DATADIR --addcoin=$addcoin fi diff --git a/bsx/removecoin.sh b/bsx/removecoin.sh new file mode 100755 index 0000000..b06da74 --- /dev/null +++ b/bsx/removecoin.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +## Prompt for user input +echo -e "\n\nThe following coins can be disabled (case sensitive)\nbitcoin\ndash\nfiro\nlitecoin\nparticl\nPIVX\n" +read -p 'Full name of coin to disable [example: litecoin] ' disablecoin +## Confirm +echo -e "\nDisable $disablecoin on your BasicSwap install, correct? Press any key to continue. CTRL-C to exit" +read +## Disable the coin +basicswap-prepare --datadir=/$SWAP_DATADIR --disablecoin=$disablecoin diff --git a/bsx/upgradecoins.sh b/bsx/upgradecoins.sh index 09452f1..e10c3c3 100755 --- a/bsx/upgradecoins.sh +++ b/bsx/upgradecoins.sh @@ -2,12 +2,12 @@ ## Prompt for user input echo "You can only update coins which you have already added to your install" -echo -e "\n\nList of coins supported by BasicSwapDEX (case sensitive):\nbitcoin\ndash\nfiro\nlitecoin\nmonero\nparticl\nPIVX\n" +echo -e "\n\nList of coins supported by BasicSwapDEX (case sensitive):\nbitcoin\ndash\nfiro\nlitecoin\nmonero\nparticl\npivx\n" read -p 'Full name of coin to update [example: litecoin] ' updatecoin ## Confirm -read -p $'\nUpdating $updatecoin, correct? Press any key to continue. CTRL-C to exit' +read -p $'\nUpdate $updatecoin, correct? Press any key to continue. CTRL-C to exit' ## Update the coin basicswap-prepare --datadir=$SWAP_DATADIR -preparebinonly --withcoins=$updatecoin -echo "updating $updatecoin" +echo "Updated $updatecoin" diff --git a/install.sh b/install.sh index d4819f9..a1c59f1 100755 --- a/install.sh +++ b/install.sh @@ -88,7 +88,7 @@ read -p 'Press Enter to continue, or CTRL-C to exit.' sudo apt update # python-is-python3 for ubuntu sudo apt install -y git wget python-is-python3 python3-venv python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config curl jq # Move scripts to /usr/local/bin -sudo cp -r -f -t /usr/local/bin/ basicswap-bash bsx* +sudo mv -f -t /usr/local/bin/ basicswap-bash bsx* ## Make venv and set variables for install export SWAP_DATADIR=$HOME/coinswaps export monerod_addr=$monerod_addr