You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
960 B
Bash
39 lines
960 B
Bash
3 years ago
|
#!/bin/sh
|
||
|
|
||
|
export RPC_CREDS="${2}"
|
||
|
export DAEMON_ADDRESS=singapore.node.xmr.pm
|
||
|
|
||
|
# Define the network we plan to operate our wallet in
|
||
|
if [[ "${1}" == "stagenet" ]]; then
|
||
|
export NETWORK=--stagenet
|
||
|
export PORT=38081
|
||
|
elif [[ "${1}" == "testnet" ]]; then
|
||
|
export NETWORK=--testnet
|
||
|
export PORT=28081
|
||
|
else
|
||
|
export NETWORK=
|
||
|
export PORT=18089
|
||
|
fi
|
||
|
|
||
|
# Create new wallet if it doesn't exist
|
||
|
if [[ ! -d /data/wallet ]]; then
|
||
|
monero-wallet-cli ${NETWORK} \
|
||
|
--generate-new-wallet /data/wallet \
|
||
|
--daemon-address http://${DAEMON_ADDRESS}:${PORT} \
|
||
|
--trusted-daemon \
|
||
|
--use-english-language-names \
|
||
|
--mnemonic-language English
|
||
|
fi
|
||
|
|
||
|
# Run RPC wallet
|
||
|
monero-wallet-rpc ${NETWORK} \
|
||
|
--daemon-address http://${DAEMON_ADDRESS}:${PORT} \
|
||
|
--wallet-file /data/wallet \
|
||
|
--password "" \
|
||
|
--rpc-login ${RPC_CREDS} \
|
||
|
--rpc-bind-port 8000 \
|
||
|
--rpc-bind-ip 0.0.0.0 \
|
||
|
--confirm-external-bind \
|
||
|
--log-file /data/wallet-rpc.log \
|
||
|
--trusted-daemon
|