2005-04-07 21:19:42 +02:00
|
|
|
#!/bin/sh
|
|
|
|
cd `dirname $0`
|
2005-05-03 11:47:56 +02:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
if [ -x `which wget` ]
|
2005-09-21 22:42:57 +02:00
|
|
|
then
|
2011-05-14 11:03:18 +02:00
|
|
|
bin/apicall.sh "Steering.html?shutdown=true"
|
2010-03-11 01:12:53 +01:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
echo "Please wait until the YaCy daemon process terminates [wget]"
|
|
|
|
echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'"
|
2006-02-04 20:31:12 +01:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
elif [ -x `which curl` ]
|
|
|
|
then
|
|
|
|
bin/apicall.sh "Steering.html?shutdown=true"
|
2005-09-21 22:42:57 +02:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
echo "Please wait until the YaCy daemon process terminates [curl]"
|
|
|
|
echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'"
|
2005-05-03 11:47:56 +02:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
elif [ -x `which java` ]
|
|
|
|
then
|
|
|
|
# generating the proper classpath
|
|
|
|
CLASSPATH=""
|
|
|
|
for N in lib/*.jar; do CLASSPATH="$CLASSPATH$N:"; done
|
|
|
|
for N in libx/*.jar; do CLASSPATH="$CLASSPATH$N:"; done
|
2006-02-04 20:31:12 +01:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
java -classpath classes:htroot:$CLASSPATH net.yacy.yacy -shutdown
|
2011-04-18 21:09:54 +02:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
echo "Please wait until the YaCy daemon process terminates [java]"
|
|
|
|
echo "You can monitor this with 'tail -f DATA/LOG/yacy00.log' and 'fuser log/yacy00.log'"
|
2011-04-18 21:09:54 +02:00
|
|
|
|
2011-05-14 11:03:18 +02:00
|
|
|
else
|
|
|
|
port=`cat DATA/SETTINGS/yacy.conf |grep "^port="|sed "s/.*=//"`
|
|
|
|
echo "Neither wget nor java could be found or are not executable."
|
|
|
|
echo "Visit http://localhost:$port/Steering.html?shutdown=true to stop YaCy or (in emergency case) use ./killYACY.sh"
|
|
|
|
fi
|
2011-12-28 02:46:29 +01:00
|
|
|
|
|
|
|
# wait until the yacy.running file disappears which means that YaCy has terminated
|
|
|
|
# If you don't want to wait, just run this concurrently
|
|
|
|
while [ -f "DATA/yacy.running" ]
|
|
|
|
do
|
|
|
|
sleep 1
|
|
|
|
done
|