mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 19:49:21 +00:00
Compare commits
2 commits
c319bcfcd3
...
98da79699c
Author | SHA1 | Date | |
---|---|---|---|
|
98da79699c | ||
|
fc7e543162 |
11 changed files with 101 additions and 48 deletions
|
@ -1,5 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
TAILS=1
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="echo -e -n \e[31;1m"
|
red="echo -e -n \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#set -x
|
#set -x
|
||||||
SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
BINDIR=$SWAP_DATADIR/bin
|
BINDIR=$SWAP_DATADIR/bin
|
||||||
|
|
||||||
echo "Checking for Coin updates" && sleep 1
|
echo "Checking for Coin updates" && sleep 1
|
||||||
|
|
30
bsx/setup.sh
30
bsx/setup.sh
|
@ -7,8 +7,13 @@ nocolor="printf \e[0m"
|
||||||
|
|
||||||
## Clone basicswap git
|
## Clone basicswap git
|
||||||
cd $SWAP_DATADIR
|
cd $SWAP_DATADIR
|
||||||
git clone https://github.com/basicswap/basicswap
|
if [[ -d basicswap ]]; then
|
||||||
cd $SWAP_DATADIR/basicswap
|
cd $SWAP_DATADIR/basicswap
|
||||||
|
git pull || { $red"Failed to pull repo. Installation aborted"; exit; }
|
||||||
|
else
|
||||||
|
git clone https://github.com/basicswap/basicswap || { $red"Failed to clone repo. Please run the installer again"; exit; }
|
||||||
|
cd $SWAP_DATADIR/basicswap
|
||||||
|
fi
|
||||||
|
|
||||||
## Macos
|
## Macos
|
||||||
if [[ $MACOS ]]; then
|
if [[ $MACOS ]]; then
|
||||||
|
@ -19,17 +24,6 @@ fi
|
||||||
$SWAP_DATADIR/venv/bin/pip3 install -r requirements.txt --require-hashes
|
$SWAP_DATADIR/venv/bin/pip3 install -r requirements.txt --require-hashes
|
||||||
$SWAP_DATADIR/venv/bin/pip3 install .
|
$SWAP_DATADIR/venv/bin/pip3 install .
|
||||||
|
|
||||||
## Decide a source for Monero's restore height
|
|
||||||
if [[ "$xmrrestoreheight" ]]; then
|
|
||||||
CURRENT_XMR_HEIGHT=$xmrrestoreheight
|
|
||||||
elif [[ "$monerod_addr" ]]; then
|
|
||||||
# Use custom Monero node
|
|
||||||
CURRENT_XMR_HEIGHT=$(curl "http://$monerod_addr:$monerod_port/get_info" | jq .height)
|
|
||||||
else
|
|
||||||
# Use public node
|
|
||||||
CURRENT_XMR_HEIGHT=$(curl http://node3.monerodevs.org:18089/get_info | jq .height)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use Tor if we want
|
# Use Tor if we want
|
||||||
enable_tor() {
|
enable_tor() {
|
||||||
if [[ "$tor_on" = 1 ]]; then
|
if [[ "$tor_on" = 1 ]]; then
|
||||||
|
@ -42,22 +36,26 @@ if [[ "$particl_mnemonic" && "$monerod_addr" ]]; then
|
||||||
# Restore seed
|
# Restore seed
|
||||||
PARTICL_MNEMONIC=$particl_mnemonic
|
PARTICL_MNEMONIC=$particl_mnemonic
|
||||||
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC"
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC" || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
elif [[ "$particl_mnemonic" ]]; then
|
elif [[ "$particl_mnemonic" ]]; then
|
||||||
# Restore seed
|
# Restore seed
|
||||||
PARTICL_MNEMONIC=$particl_mnemonic
|
PARTICL_MNEMONIC=$particl_mnemonic
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC"
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC" || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
elif [[ "$monerod_addr" ]]; then
|
elif [[ "$monerod_addr" ]]; then
|
||||||
# Setup new install and use a remote monero node
|
# Setup new install and use a remote monero node
|
||||||
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
else
|
else
|
||||||
# Setup new install using local nodes
|
# Setup new install using local nodes
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -7,8 +7,13 @@ nocolor="printf \e[0m"
|
||||||
|
|
||||||
## Clone basicswap git
|
## Clone basicswap git
|
||||||
cd $SWAP_DATADIR
|
cd $SWAP_DATADIR
|
||||||
git clone https://github.com/basicswap/basicswap
|
if [[ -d basicswap ]]; then
|
||||||
cd $SWAP_DATADIR/basicswap
|
cd $SWAP_DATADIR/basicswap
|
||||||
|
git pull || { $red"Failed to pull repo. Installation aborted"; exit; }
|
||||||
|
else
|
||||||
|
git clone https://github.com/basicswap/basicswap || { $red"Failed to clone repo. Please run the installer again"; exit; }
|
||||||
|
cd $SWAP_DATADIR/basicswap
|
||||||
|
fi
|
||||||
|
|
||||||
## Macos
|
## Macos
|
||||||
if [[ $MACOS ]]; then
|
if [[ $MACOS ]]; then
|
||||||
|
@ -19,17 +24,6 @@ fi
|
||||||
torsocks $SWAP_DATADIR/venv/bin/pip3 install -r requirements.txt --require-hashes
|
torsocks $SWAP_DATADIR/venv/bin/pip3 install -r requirements.txt --require-hashes
|
||||||
torsocks $SWAP_DATADIR/venv/bin/pip3 install .
|
torsocks $SWAP_DATADIR/venv/bin/pip3 install .
|
||||||
|
|
||||||
## Decide a source for Monero's restore height
|
|
||||||
if [[ "$xmrrestoreheight" ]]; then
|
|
||||||
CURRENT_XMR_HEIGHT=$xmrrestoreheight
|
|
||||||
elif [[ "$monerod_addr" ]]; then
|
|
||||||
# Use custom Monero node
|
|
||||||
CURRENT_XMR_HEIGHT=$(curl "http://$monerod_addr:$monerod_port/get_info" | jq .height)
|
|
||||||
else
|
|
||||||
# Use public node
|
|
||||||
CURRENT_XMR_HEIGHT=$(curl http://node3.monerodevs.org:18089/get_info | jq .height)
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Use Tor if we want
|
# Use Tor if we want
|
||||||
enable_tor() {
|
enable_tor() {
|
||||||
if [[ "$tor_on" = 1 ]]; then
|
if [[ "$tor_on" = 1 ]]; then
|
||||||
|
@ -42,22 +36,26 @@ if [[ "$particl_mnemonic" && "$monerod_addr" ]]; then
|
||||||
# Restore seed
|
# Restore seed
|
||||||
PARTICL_MNEMONIC=$particl_mnemonic
|
PARTICL_MNEMONIC=$particl_mnemonic
|
||||||
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
||||||
torsocks basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC"
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC" || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
elif [[ "$particl_mnemonic" ]]; then
|
elif [[ "$particl_mnemonic" ]]; then
|
||||||
# Restore seed
|
# Restore seed
|
||||||
PARTICL_MNEMONIC=$particl_mnemonic
|
PARTICL_MNEMONIC=$particl_mnemonic
|
||||||
torsocks basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC"
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 --particl_mnemonic="$PARTICL_MNEMONIC" || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
elif [[ "$monerod_addr" ]]; then
|
elif [[ "$monerod_addr" ]]; then
|
||||||
# Setup new install and use a remote monero node
|
# Setup new install and use a remote monero node
|
||||||
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
XMR_RPC_HOST=$monerod_addr XMR_RPC_PORT=$monerod_port \
|
||||||
torsocks basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
else
|
else
|
||||||
# Setup new install using local nodes
|
# Setup new install using local nodes
|
||||||
torsocks basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$CURRENT_XMR_HEIGHT --wowrestoreheight=600000
|
basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero,wownero --xmrrestoreheight=$xmrrestoreheight --wowrestoreheight=600000 || { $red"Installation failed. Try again"; exit; }
|
||||||
|
$red"\n\nMonero wallet restore height is ${xmrrestoreheight}"; $nocolor
|
||||||
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
$red"\n\nMake note of your seed above\n\n"; $nocolor
|
||||||
enable_tor
|
enable_tor
|
||||||
fi
|
fi
|
||||||
|
|
58
install.sh
58
install.sh
|
@ -1,16 +1,41 @@
|
||||||
#/bin/bash
|
#/bin/bash
|
||||||
|
#set -x
|
||||||
export SWAP_DATADIR=$HOME/coinswaps
|
export SWAP_DATADIR=$HOME/coinswaps
|
||||||
|
if [[ $USER == amnesia ]]; then
|
||||||
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
||||||
|
fi
|
||||||
|
|
||||||
# Colors
|
# Colors
|
||||||
red="printf \e[31;1m"
|
red="printf \e[31;1m"
|
||||||
green="printf \e[32;1m"
|
green="printf \e[32;1m"
|
||||||
nocolor="printf \e[0m"
|
nocolor="printf \e[0m"
|
||||||
|
|
||||||
|
# Check if bsx is already installedo
|
||||||
|
chain=(particl monero wownero dash decred firo litecoin bitcoin bitcoincash pivx)
|
||||||
|
for coin in "${chain[@]}"; do
|
||||||
|
if [[ -f "${SWAP_DATADIR}/${coin}/${coin}.conf" ]]; then
|
||||||
|
printf "Existing configuration file found at ${SWAP_DATADIR}/${coin}/${coin}.conf\n"
|
||||||
|
abort=1
|
||||||
|
fi
|
||||||
|
if [[ -f "${SWAP_DATADIR}/${coin}/${coin}d.conf" ]]; then
|
||||||
|
printf "Existing configuration file found at ${SWAP_DATADIR}/${coin}/${coin}d.conf\n"
|
||||||
|
abort=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [[ -f "${SWAP_DATADIR}/basicswap.json" ]]; then
|
||||||
|
printf "Existing configuration file(s) found at ${SWAP_DATADIR}/basicswap.json.\n"
|
||||||
|
abort=1
|
||||||
|
fi
|
||||||
|
if [[ $abort ]]; then
|
||||||
|
$red"Aborting install\n"; $nocolor; exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Check if basicswap is running
|
# Check if basicswap is running
|
||||||
if [[ -f $SWAP_DATADIR/particl/particl.pid ]]; then
|
if [[ -f ${SWAP_DATADIR}/particl/particl.pid ]]; then
|
||||||
bsx_pid=$(cat $SWAP_DATADIR/particl/particl.pid)
|
bsx_pid=$(cat ${SWAP_DATADIR}/particl/particl.pid)
|
||||||
if [[ $bsx_pid ]]; then
|
if [[ $bsx_pid ]]; then
|
||||||
bsx_run=$(pidof particld | grep $bsx_pid)
|
bsx_run=$(pgrep particld | grep $bsx_pid)
|
||||||
if [[ $bsx_run ]]; then
|
if [[ $bsx_run ]]; then
|
||||||
$red"\nError: BasicSwapDEX is already installed.\n"; $nocolor
|
$red"\nError: BasicSwapDEX is already installed.\n"; $nocolor
|
||||||
exit
|
exit
|
||||||
|
@ -62,7 +87,7 @@ detect_os_arch() {
|
||||||
# Debian / Ubuntu / Mint
|
# Debian / Ubuntu / Mint
|
||||||
INSTALL="sudo apt install"
|
INSTALL="sudo apt install"
|
||||||
UPDATE="sudo apt update"
|
UPDATE="sudo apt update"
|
||||||
DEPENDENCY="python3-pip python3-venv libpython3-dev gnupg pkg-config"
|
DEPENDENCY="python3-pip python3-venv gnupg pkg-config"
|
||||||
elif type -p dnf > /dev/null; then
|
elif type -p dnf > /dev/null; then
|
||||||
# Fedora
|
# Fedora
|
||||||
INSTALL="sudo dnf install"
|
INSTALL="sudo dnf install"
|
||||||
|
@ -92,7 +117,7 @@ $INSTALL $DEPENDENCY automake libtool jq
|
||||||
# Enable tor
|
# Enable tor
|
||||||
printf "\n[1] Tor ON (requires sudo)\n[2] Tor OFF\n"
|
printf "\n[1] Tor ON (requires sudo)\n[2] Tor OFF\n"
|
||||||
until [[ "$tor_on" =~ ^[12]$ ]]; do
|
until [[ "$tor_on" =~ ^[12]$ ]]; do
|
||||||
read -p 'Select an option: [1|2] ' tor_on
|
read -p 'Select an option: [1|2]: ' tor_on
|
||||||
case $tor_on in
|
case $tor_on in
|
||||||
1)
|
1)
|
||||||
$green"BasicSwapDEX will use Tor\n";$nocolor
|
$green"BasicSwapDEX will use Tor\n";$nocolor
|
||||||
|
@ -109,7 +134,7 @@ done
|
||||||
## Particl restore Seed
|
## Particl restore Seed
|
||||||
printf "\n[1] New Install (default)\n[2] Restore from Particl Seed\n"
|
printf "\n[1] New Install (default)\n[2] Restore from Particl Seed\n"
|
||||||
until [[ "$restore" =~ ^[12]$ ]]; do
|
until [[ "$restore" =~ ^[12]$ ]]; do
|
||||||
read -p 'Select an option: [1|2] ' restore
|
read -p 'Select an option: [1|2]: ' restore
|
||||||
case $restore in
|
case $restore in
|
||||||
1)
|
1)
|
||||||
$green"Installing BasicSwapDEX\n"; $nocolor
|
$green"Installing BasicSwapDEX\n"; $nocolor
|
||||||
|
@ -167,10 +192,17 @@ read -p 'Select an option [1|2]: ' l
|
||||||
else
|
else
|
||||||
$red"The node at $monerod_addr:$monerod_port is not accessible. Try again\n"; $nocolor
|
$red"The node at $monerod_addr:$monerod_port is not accessible. Try again\n"; $nocolor
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
if [[ -z $xmrrestoreheight ]]; then
|
||||||
|
xmrrestoreheight="${checknode}"
|
||||||
|
fi
|
||||||
|
$green"Monero wallet Restore Height set to ${xmrrestoreheight}\n"; $nocolor
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
|
xmrrestoreheight=$(curl -s http://node3.monerodevs.org:18089/get_info | jq .height || { echo "Failed to get Monero blockchain height. Please run the installer again."; exit; })
|
||||||
$green"BasicSwapDEX will run the Monero node for you.\n"; $nocolor
|
$green"BasicSwapDEX will run the Monero node for you.\n"; $nocolor
|
||||||
|
$green"Monero wallet Restore Height set to ${xmrrestoreheight}\n"; $nocolor
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
$red"You must answer 1 or 2\n"; $nocolor
|
$red"You must answer 1 or 2\n"; $nocolor
|
||||||
|
@ -214,12 +246,12 @@ fi
|
||||||
cp -r basicswap-bash bsx* $HOME/.local/bin/
|
cp -r basicswap-bash bsx* $HOME/.local/bin/
|
||||||
|
|
||||||
## Make venv and set variables for install
|
## Make venv and set variables for install
|
||||||
export monerod_addr=$monerod_addr
|
export monerod_addr="${monerod_addr}"
|
||||||
export monerod_port=$monerod_port
|
export monerod_port="${monerod_port}"
|
||||||
export particl_mnemonic=$particl_mnemonic
|
export particl_mnemonic="${particl_mnemonic}"
|
||||||
export xmrrestoreheight=$xmrrestoreheight
|
export xmrrestoreheight="${xmrrestoreheight}"
|
||||||
export tor_on=$tor_on
|
export tor_on="${tor_on}"
|
||||||
export TAILS=$TAILS
|
export TAILS="${TAILS}"
|
||||||
python3 -m venv "$SWAP_DATADIR/venv"
|
python3 -m venv "${SWAP_DATADIR}/venv"
|
||||||
## Activate venv
|
## Activate venv
|
||||||
$HOME/.local/bin/bsx/activate_venv.sh
|
$HOME/.local/bin/bsx/activate_venv.sh
|
||||||
|
|
Loading…
Reference in a new issue