#!/bin/bash
# Copyright (c) 2019-2020 Hush developers
# set working directory to the location of this script
# readlink -f does not always exist
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd $DIR
DIR="$( cd "$( dirname "$( readlink "${BASH_SOURCE[0]}" )" )" && pwd )"
cd $DIR

NAME=HUSH3
CLIENTNAME="GoldenSandtrout"
DEFAULTS="-ac_sapling=1 -clientname=$CLIENTNAME"

# This is a Hush-flavored KMD that allows us to pass in arbitary CLI
# flags, since hushd is specific to Hush mainnet
KMD=${KOMODOD:-./komodod}
if [ -f $KMD ]; then
   $KMD $DEFAULTS "$@"
else
	# We prefix our binary when installed
	# system wide on Debain system, to prevent clashes
	KMD=hush-komodod
    $KMD $DEFAULTS "$@"
fi
