2014-08-25 22:47:33 +02:00
|
|
|
#!/usr/bin/env bash
|
2010-02-22 21:14:16 +01:00
|
|
|
cd "`dirname $0`"
|
|
|
|
port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
2014-01-07 21:52:19 +01:00
|
|
|
admin=$(grep ^adminAccountUserName= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
2010-02-22 21:14:16 +01:00
|
|
|
pw=$(grep ^adminAccountBase64MD5= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
|
|
|
|
|
|
|
|
if which curl &>/dev/null; then
|
2014-01-07 21:52:19 +01:00
|
|
|
curl -s -u $admin:$pw "http://127.0.0.1:$port/$1"
|
2010-02-22 21:14:16 +01:00
|
|
|
elif which wget &>/dev/null; then
|
2014-01-07 21:52:19 +01:00
|
|
|
wget -q -t 1 --timeout=120 --http-user $admin --http-password $pw "http://127.0.0.1:$port/$1" -O -
|
2010-02-22 21:14:16 +01:00
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
2014-01-05 11:50:23 +01:00
|
|
|
|