From a4ce41ed39e2de298d1625bf88626006e7b9c4a9 Mon Sep 17 00:00:00 2001 From: CalDescent Date: Thu, 20 Jan 2022 20:31:16 +0000 Subject: [PATCH] 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. --- tools/qdata | 2 ++ tools/qort | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/qdata b/tools/qdata index c9745900..5ca61e45 100755 --- a/tools/qdata +++ b/tools/qdata @@ -28,6 +28,8 @@ if [ -f "apikey.txt" ]; then apikey=$(cat "apikey.txt") elif [ -f "${script_dir}/../apikey.txt" ]; then apikey=$(cat "${script_dir}/../apikey.txt") +elif [ -f "${HOME}/qortal/apikey.txt" ]; then + apikey=$(cat "${HOME}/qortal/apikey.txt") fi method=$1 diff --git a/tools/qort b/tools/qort index dcce34d2..79712b1b 100755 --- a/tools/qort +++ b/tools/qort @@ -71,6 +71,8 @@ if [ -f "apikey.txt" ]; then apikey=$(cat "apikey.txt") elif [ -f "${script_dir}/../apikey.txt" ]; then apikey=$(cat "${script_dir}/../apikey.txt") +elif [ -f "${HOME}/qortal/apikey.txt" ]; then + apikey=$(cat "${HOME}/qortal/apikey.txt") fi if [ "${url:0:4}" != "http" ]; then