diff options
| author | Michael Peter Christen <mc@yacy.net> | 2014-01-07 21:52:19 +0100 |
|---|---|---|
| committer | Michael Peter Christen <mc@yacy.net> | 2014-01-07 21:52:19 +0100 |
| commit | 644573cfc4d0641bf497dcb093c4b267de24cfcd (patch) | |
| tree | 91692b26a957064ae060a64822d9bb525fe20195 /bin | |
| parent | add0e428048b9073bcf5435bb8215d684742e962 (diff) | |
using the adminAccountUserName from yacy.conf within apicall.sh
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/apicall.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/apicall.sh b/bin/apicall.sh index 676491f5a..c0951ad81 100755 --- a/bin/apicall.sh +++ b/bin/apicall.sh @@ -1,12 +1,13 @@ #!/bin/bash cd "`dirname $0`" port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2) +admin=$(grep ^adminAccountUserName= ../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 -u admin:$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 --http-user admin --http-password 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 |
