mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 11:39:21 +00:00
25 lines
630 B
Bash
Executable file
25 lines
630 B
Bash
Executable file
#!/bin/bash
|
|
export SWAP_DATADIR=$HOME/coinswaps
|
|
if [[ $USER == amnesia ]]; then
|
|
export SWAP_DATADIR=$HOME/Persistent/coinswaps
|
|
TAILS=1
|
|
fi
|
|
|
|
# Colors
|
|
red="echo -e -n \e[31;1m"
|
|
green="echo -e -n \e[32;1m"
|
|
nocolor="echo -e -n \e[0m"
|
|
|
|
if [[ -f $SWAP_DATADIR/particl/particl.pid ]]; then
|
|
bsx_pid=$(cat $SWAP_DATADIR/particl/particl.pid)
|
|
if [[ $bsx_pid ]]; then
|
|
bsx_run=$(pidof particld | grep $bsx_pid)
|
|
if [[ $bsx_run ]]; then
|
|
$red"\nError: BasicSwapDEX is already running.\n"; $nocolor
|
|
exit
|
|
fi
|
|
fi
|
|
fi
|
|
|
|
. $SWAP_DATADIR/venv/bin/activate
|
|
$HOME/.local/bin/bsx/startup.sh
|