You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
439 B
13 lines
439 B
#!/bin/bash
|
|
cd "`dirname $0`"
|
|
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://localhost:$port/$1" > /dev/null
|
|
elif which wget &>/dev/null; then
|
|
wget -q -t 1 --timeout=5 --header "Authorization: realm=$pw" "http://localhost:$port/$1" -O /dev/null
|
|
else
|
|
exit 1
|
|
fi
|