diff --git a/bsx/setup.sh b/bsx/setup.sh index 3acac1c..5de5e7c 100755 --- a/bsx/setup.sh +++ b/bsx/setup.sh @@ -35,6 +35,9 @@ else CURRENT_XMR_HEIGHT=$(curl https://localmonero.co/blocks/api/get_stats | jq .height) fi +# Use Tor if we want +enable_tor + # Use the custom Monero node if [[ "$monerod_addr" && "$particl_mnemonic" ]]; then PARTICL_MNEMONIC=$particl_mnemonic diff --git a/bsx/update.sh b/bsx/update.sh index 856087c..bbe0fa7 100755 --- a/bsx/update.sh +++ b/bsx/update.sh @@ -1,4 +1,4 @@ #!/bin/bash cd $SWAP_DATADIR/basicswap git pull -pip3 install . +$SWAT_DATADIR/venv/bin/pip install . diff --git a/install.sh b/install.sh index 2fbad8a..1d439fc 100755 --- a/install.sh +++ b/install.sh @@ -46,6 +46,28 @@ detect_os_arch() { } detect_os_arch +# Enable tor +echo -e "\n\n[1] Tor ON\n[2] Tor OFF\n" +until [[ "$tor_on" =~ ^[12]$ ]]; do +read -p 'Select an option: [1|2] ' restore + case $restore in + 1) + $green"\nBasicSwapDEX will use Tor\n";$nocolor + ;; + 2) + $red"\nBasicSwapDEX will NOT use Tor\n";$nocolor + *) + $red"You must answer 1 or 2\n";$nocolor + ;; + esac +done + +enable_tor() { + if [[ "$tor_on" = 1 ]]; then + /usr/local/bin/bsx-enabletor + fi +} + ## Particl restore Seed echo -e "\n\n[1] New Install (default)\n[2] Restore from Particl Seed\n" until [[ "$restore" =~ ^[12]$ ]]; do @@ -116,7 +138,7 @@ echo -e "\n\nInstalling dependencies" read -p 'Press Enter to continue, or CTRL-C to exit.' ## Update & Install dependencies $UPDATE -$INSTALL $DEPENDENCY git wget unzip automake libtool curl jq +$INSTALL $DEPENDENCY git wget unzip automake libtool jq # Move scripts to /usr/local/bin sudo rm -r /usr/local/bin/bsx* /usr/local/bin/basicswap-bash sudo mv -f -t /usr/local/bin/ basicswap-bash bsx* @@ -127,6 +149,6 @@ export monerod_port=$monerod_port export particl_mnemonic=$particl_mnemonic export xmrrestoreheight=$xmrrestoreheight mkdir -p "$SWAP_DATADIR/venv" -python3 -m venv "$SWAP_DATADIR/venv" +python -m venv "$SWAP_DATADIR/venv" ## Activate venv /usr/local/bin/bsx/activate_venv.sh