forked from Qortal/qortal
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:
parent
1b42062d57
commit
a4ce41ed39
@ -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
|
||||||
|
@ -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…
Reference in New Issue
Block a user