mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
8d1b66accc
*) replaced all shebangs with more universal versions
15 lines
488 B
Bash
Executable File
15 lines
488 B
Bash
Executable File
#!/usr/bin/env 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"
|
|
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 -
|
|
else
|
|
exit 1
|
|
fi
|
|
|