renamed to util
This commit is contained in:
41
util/docker-entrypoint.sh
Executable file
41
util/docker-entrypoint.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/bash
|
||||
# Copyright (c) 2016-2021 The Hush developers
|
||||
# Distributed under the GPLv3 software license, see the accompanying
|
||||
# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
|
||||
|
||||
#set -ex
|
||||
echo "...Checking HUSH3.conf"
|
||||
|
||||
# TODO: support legacy location?
|
||||
if [ ! -e "$HOME/.hush/HUSH3/HUSH3.conf" ]; then
|
||||
mkdir -p $HOME/.hush/HUSH3
|
||||
|
||||
DATE=$(date)
|
||||
echo "...Creating HUSH3.conf"
|
||||
cat <<EOF > $HOME/.hush/HUSH3.conf
|
||||
# Generated by docker-entrypoint.sh at $DATE
|
||||
rpcuser=hush
|
||||
rpcpassword=${rpcpassword:-`dd if=/dev/urandom bs=33 count=1 2>/dev/null | base64`}
|
||||
txindex=1
|
||||
bind=${listenip:-127.0.0.1}
|
||||
rpcbind=${listenip:-127.0.0.1}
|
||||
# Some knobs you might want to turn
|
||||
debug=0
|
||||
zdebug=0
|
||||
zindex=0
|
||||
EOF
|
||||
|
||||
cat $HOME/.hush/HUSH3/HUSH3.conf
|
||||
fi
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
args=("$@")
|
||||
elif [ -z ${assetchain+x} ]; then
|
||||
args=("-gen -genproclimit=${genproclimit:-2} -pubkey=${pubkey}")
|
||||
else
|
||||
args=("-pubkey=${pubkey} -ac_name=${assetchain} -addnode=${seednode}")
|
||||
fi
|
||||
|
||||
echo "Running: hushd ${args[@]}"
|
||||
|
||||
exec hushd ${args[@]}
|
||||
Reference in New Issue
Block a user