From 561d0155f38906af8e4d5109db81ba01d6110551 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Tue, 25 Aug 2020 22:49:55 -0700 Subject: [PATCH] remove old setup script and add new script for generating wownero wallets --- bin/setup.sh | 44 -------------------------------------------- bin/setup_wallet.sh | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 44 deletions(-) delete mode 100755 bin/setup.sh create mode 100755 bin/setup_wallet.sh diff --git a/bin/setup.sh b/bin/setup.sh deleted file mode 100755 index ccfa640..0000000 --- a/bin/setup.sh +++ /dev/null @@ -1,44 +0,0 @@ -echo -e "[+] Creating directories" -mkdir -p data/secrets data/wallets - -if [[ ! -f "data/secrets/pass" ]]; -then - echo -e "[+] Creating new wallet secret" - openssl rand -base64 32 > data/secrets/pass -fi - -# echo -e "[+] Running wallet CLI" -# docker run --rm -it --name monero-wallet \ -# -v ~/git/lzahq/wownero-web-wallet/data:/data \ -# -p 8080:8080 \ -# --entrypoint "monero-wallet-cli" wownero-web-wallet \ -# --daemon-address crypto.int.lzahq.tech:38081 \ -# --stagenet \ -# --generate-new-wallet /data/wallets/lza-stage \ -# --use-english-language-names \ -# --password-file /data/secrets/pass \ -# --mnemonic-language english \ -# --restore-height 461618 - -# echo -e "[+] Running wallet RPC" -# docker run --rm -it --name monero-wallet \ -# -v ~/git/lzahq/wownero-web-wallet/data:/data \ -# -p 8080:8080 \ -# --entrypoint "monero-wallet-rpc" wownero-web-wallet \ -# --daemon-address crypto.int.lzahq.tech:38081 \ -# --stagenet \ -# --non-interactive \ -# --generate-from-json /data/wallet.json \ -# --disable-rpc-login \ -# --rpc-bind-port 8080 - -# docker run --rm -it --name monero-wallet \ -# -v ~/git/lzahq/wownero-web-wallet/data:/data \ -# -p 8080:8080 \ -# --entrypoint "monero-wallet-rpc" wownero-web-wallet \ -# --daemon-address crypto.int.lzahq.tech:38081 \ -# --stagenet \ -# --non-interactive \ -# --wallet-file /data/wallets/lza-stage \ -# --password-file /data/secrets/pass \ -# --rpc-bind-port 8080 diff --git a/bin/setup_wallet.sh b/bin/setup_wallet.sh new file mode 100755 index 0000000..c882af4 --- /dev/null +++ b/bin/setup_wallet.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +set -e +set +x + +# these are only used for local development +WALLET_PATH="$HOME/data/wowstash/wallet" +WALLET_PASS="knz7FlihIGfhdDZHKkC3W+xgYTp1G+jE9U1BaXduw" +WALLET_RPC_USER="wowstash" +WALLET_RPC_PASS="123sfj12joiasd1293aAWE!#" +DAEMON_URI="https://node.suchwow.xyz:443" + +# create new wallet path +mkdir -p $WALLET_PATH + +if [ ! -d "$WALLET_PATH" ]; then + # initialize new wallet and retain seed + docker run --rm -it --name wowstash-wallet-init \ + -v $WALLET_PATH:/root \ + lalanza808/wownero \ + wownero-wallet-cli \ + --daemon-address $DAEMON_URI \ + --generate-new-wallet /root/wow \ + --password $WALLET_PASS +fi + +# setup rpc process +docker run --rm -d --name wowstash-wallet \ + -v $WALLET_PATH:/root \ + -p 9999:9999 \ + lalanza808/wownero \ + wownero-wallet-rpc \ + --daemon-address $DAEMON_URI \ + --wallet-file /root/wow \ + --password $WALLET_PASS \ + --rpc-bind-port 9999 \ + --rpc-bind-ip 0.0.0.0 \ + --confirm-external-bind \ + --rpc-login "$WALLET_RPC_USER:$WALLET_RPC_PASS" \ + --log-file /root/rpc.log