Browse Source

Updated qort and qdata to check for apikey.txt in $HOME/qortal, which is the most commonly installed location.

This allows the script to be run from any directory, as long as the core is installed at $HOME/qortal.
trade-portal-updates
CalDescent 3 years ago
parent
commit
a4ce41ed39
  1. 2
      tools/qdata
  2. 2
      tools/qort

2
tools/qdata

@ -28,6 +28,8 @@ if [ -f "apikey.txt" ]; then
apikey=$(cat "apikey.txt") apikey=$(cat "apikey.txt")
elif [ -f "${script_dir}/../apikey.txt" ]; then elif [ -f "${script_dir}/../apikey.txt" ]; then
apikey=$(cat "${script_dir}/../apikey.txt") apikey=$(cat "${script_dir}/../apikey.txt")
elif [ -f "${HOME}/qortal/apikey.txt" ]; then
apikey=$(cat "${HOME}/qortal/apikey.txt")
fi fi
method=$1 method=$1

2
tools/qort

@ -71,6 +71,8 @@ if [ -f "apikey.txt" ]; then
apikey=$(cat "apikey.txt") apikey=$(cat "apikey.txt")
elif [ -f "${script_dir}/../apikey.txt" ]; then elif [ -f "${script_dir}/../apikey.txt" ]; then
apikey=$(cat "${script_dir}/../apikey.txt") apikey=$(cat "${script_dir}/../apikey.txt")
elif [ -f "${HOME}/qortal/apikey.txt" ]; then
apikey=$(cat "${HOME}/qortal/apikey.txt")
fi fi
if [ "${url:0:4}" != "http" ]; then if [ "${url:0:4}" != "http" ]; then

Loading…
Cancel
Save