joininbox/scripts/_commands.sh
openoms 88cda23d85
wait for key before returning to menu on error
code quality improvements:
add double quotes to prevent word splitting
fix useless echo and cat
2020-09-09 09:50:47 +01:00

23 lines
646 B
Bash
Executable file

#!/bin/bash
# SHORTCUT COMMANDS for the user 'joinmarket' from terminal
# command: menu
# calls directly the main menu
function menu() {
cd /home/joinmarket
./menu.sh
}
# command: torthistx
function torthistx() {
if [ "$(cat /home/joinmarket/joinin.conf 2>/dev/null | grep -c "runBehindTor=on")" -eq 1 ]; then
echo ""
echo "Broadcasts a transaction through Tor to Blockstream's API and into the network..."
echo ""
echo "Transaction ID:"
curl --socks5-hostname localhost:9050 -d "$1" -X POST http://explorerzydxu5ecjrkwceayqybizmpjjznk5izmitf2modhcusuqlid.onion/api/tx
else
echo "Not running behind Tor"
fi
}