summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMichael Peter Christen <mc@yacy.net>2014-01-05 11:50:23 +0100
committerMichael Peter Christen <mc@yacy.net>2014-01-05 11:50:23 +0100
commitc9519456661d287de5f6ffe61fcb7fff52fefd72 (patch)
treed68e57aceb0cfa110649c8a34aec421f312447dd /bin
parent9bd71fdbb4765bccfde4cc8d00b0104d0cc11906 (diff)
modified log-in detail to enable admin-login from localhost with stored
hash even if localhost access is disabled. This is urgently needed for the apicall.sh script since that is used for high-availability set-up (checkalive and indexdump for index mirroring)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/apicall.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/apicall.sh b/bin/apicall.sh
index 50a3331ca..676491f5a 100755
--- a/bin/apicall.sh
+++ b/bin/apicall.sh
@@ -4,9 +4,10 @@ port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
pw=$(grep ^adminAccountBase64MD5= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
if which curl &>/dev/null; then
- curl -s --header "Authorization: realm=$pw" "http://127.0.0.1:$port/$1"
+ curl -s -u admin:$pw "http://127.0.0.1:$port/$1"
elif which wget &>/dev/null; then
- wget -q -t 1 --timeout=120 --header "Authorization: realm=$pw" "http://127.0.0.1:$port/$1" -O -
+ wget -q -t 1 --timeout=120 --http-user admin --http-password pw "http://127.0.0.1:$port/$1" -O -
else
exit 1
fi
+