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.
This commit is contained in:
CalDescent 2022-01-20 20:31:16 +00:00
parent 1b42062d57
commit a4ce41ed39
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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