*) Updater r3 - Please test and report major problems (don't use this version for stable-release, r3 updates always to latest dev-version of YaCy)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3703 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
rramthun 18 years ago
parent d78f5785d2
commit d5e634d06b

Binary file not shown.

@ -0,0 +1,67 @@
@Echo Off
title YaCy
If %1.==CPGEN. GoTo :CPGEN
Rem Generating the proper classpath unsing loops and labels
Set CLASSPATH=classes;htroot;lib/updater/YaCyUpdater_r3.jar
For %%X in (lib/*.jar) Do Call %0 CPGEN lib\%%X
For %%X in (libx/*.jar) Do Call %0 CPGEN libx\%%X
REM Please change the "javastart" settings in the web-interface "Basic Configuration" -> "Advanced"
set jmx=
set jms=
set javacmd=-Xmx64m -Xms10m
set priolvl=0
set priority=/NORMAL
if exist DATA\SETTINGS\httpProxy.conf GoTo :GETSTARTOPTS
:STARTJAVA
Rem Starting YaCy
Echo Generated classpath:%CLASSPATH%
Echo JRE Parameters:%javacmd%
Echo Priority:%priority%
Echo ****************** YaCy Web Crawler/Indexer ^& Search Engine *******************
Echo **** (C) by Michael Peter Christen, usage granted under the GPL Version 2 ****
Echo **** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy ****
Echo ** LOG of YaCy: DATA/LOG/yacy00.log (and yacy^<xx^>.log) **
Echo ** STOP YaCy: execute stopYACY.bat and wait some seconds **
Echo ** GET HELP for YaCy: see www.yacy-websearch.net/wiki and www.yacy-forum.de **
Echo *******************************************************************************
Echo ^>^> YaCy started as daemon process. Administration at http://localhost:%port% ^<^<
start "YaCy" %priority% /B /WAIT java %javacmd% -classpath %CLASSPATH% YaCyUpdater
if not exist DATA\yacy.restart GoTo :END
:WAIT
echo Please wait...
REM 'sleep' five seconds
ping localhost -n 5 >NUL
if exist DATA\yacy.running GoTo :WAIT
del DATA\yacy.restart
Rem This target is used to read java runtime parameters out of the yacy config file
:GETSTARTOPTS
for /F "tokens=1,2 delims==" %%i in (DATA\SETTINGS\httpProxy.conf) do (
if "%%i"=="javastart_Xmx" set jmx=%%j
if "%%i"=="javastart_Xms" set jms=%%j
if "%%i"=="port" set port=%%j
if "%%i"=="javastart_priority" set priolvl=%%j
)
if defined jmx set javacmd=-%jmx%
if defined jms set javacmd=-%jms% %javacmd%
if not defined port set port=8080
if defined priolvl (
if %priolvl% == 20 set priority=/LOW
if %priolvl% == 10 set priority=/BELOWNORMAL
)
GoTo :STARTJAVA
Rem This target is used to concatenate the classpath parts
:CPGEN
Set CLASSPATH=%CLASSPATH%;%2
Rem Target needed to jump to the end of the file
:END

@ -0,0 +1,11 @@
cd `dirname $0`
./startYACY_with_experimental_Updater.sh &
echo "****************** YaCy Web Crawler/Indexer & Search Engine *******************"
echo "**** (C) by Michael Peter Christen, usage granted under the GPL Version 2 ****"
echo "**** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy ****"
echo "** LOG of YaCy: DATA/LOG/yacy00.log (and yacy<xx>.log) **"
echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **"
echo "** GET HELP for YaCy: see www.yacy-websearch.net/wiki and www.yacy-forum.de **"
echo "*******************************************************************************"
echo " >> YaCy started as daemon process. Administration at http://localhost:8080 <<"
echo " You can close this window now, this will NOT shut down your YaCy peer."

@ -0,0 +1,123 @@
#!/bin/sh
JAVA="`which java`"
LOGFILE="yacy.log"
if [ "`id -u`" -eq 0 ]
then
echo
echo "For security reasons you should not run this script as root!"
echo
exit 1
elif [ ! -x "$JAVA" ]
then
echo "The java command is not executable."
echo "Either you have not installed java or it is not in your PATH"
#Cron supports setting the path in
#echo "Has this script been invoked by CRON?"
#echo "if so, please set PATH in the crontab, or set the correct path in the variable in this script."
exit 1
fi
#startup YaCy
cd "`dirname $0`"
options="`getopt -n YaCy -o d,l,p,t -- $@`"
if [ $? -ne 0 ];then
exit 1;
fi
isparameter=0; #options or parameter part of getopts?
parameter="" #parameters will be collected here
LOGGING=0
DEBUG=0
PRINTONLY=0
TAILLOG=0
for option in $options;do
if [ $isparameter -ne 1 ];then #option
if [ "$option" = "-l" ];then
LOGGING=1
if [ $DEBUG -eq 1 ];then
echo "can not combine -l and -d"
exit 1;
fi
elif [ "$option" = "-d" ];then
DEBUG=1
if [ $LOGGING -eq 1 ];then
echo "can not combine -l and -d"
exit 1;
fi
elif [ "$option" = "-p" ];then
PRINTONLY=1
elif [ "$option" = "-t" ];then
TAILLOG=1
fi #which option
else #parameter
if [ x$option = "--" ];then #option / parameter seperator
isparameter=1;
continue
else
parameter="$parameter $option"
fi
fi #parameter or option?
done
#echo $options;exit 0 #DEBUG for getopts
#get javastart args
java_args=""
if [ -f DATA/SETTINGS/httpProxy.conf ]
then
# startup memory
for i in Xmx Xms; do
j=`grep javastart_$i DATA/SETTINGS/httpProxy.conf`;
j="${j#javastart_$i=}";
if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi;
done
# Priority
j=`grep javastart_priority DATA/SETTINGS/httpProxy.conf`;
j="${j#javastart_priority=}"
if [ ! -z "$j" ];then
if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi;
fi
# for i in `grep javastart DATA/SETTINGS/httpProxy.conf`;do
# i="${i#javastart_*=}";
# JAVA_ARGS="-$i $JAVA_ARGS";
# done
fi
#echo "JAVA_ARGS: $JAVA_ARGS"
#echo "JAVA: $JAVA"
# generating the proper classpath
CLASSPATH="lib/YaCyUpdater_r3.jar:"
for N in lib/*.jar; do CLASSPATH="$CLASSPATH$N:"; done
for N in libx/*.jar; do CLASSPATH="$CLASSPATH$N:"; done
CLASSPATH="classes:.:htroot:$CLASSPATH"
cmdline="";
if [ $DEBUG -eq 1 ] #debug
then
cmdline="$JAVA $JAVA_ARGS -Djava.awt.headless=true -classpath $CLASSPATH yacy"
elif [ $LOGGING -eq 1 ];then #logging
cmdline="$JAVA $JAVA_ARGS -Djava.awt.headless=true -classpath $CLASSPATH yacy >> yacy.log &"
else
cmdline="$JAVA $JAVA_ARGS -Djava.awt.headless=true -classpath $CLASSPATH yacy &> /dev/null &"
fi
if [ $PRINTONLY -eq 1 ];then
echo $cmdline
else
echo "****************** YaCy Web Crawler/Indexer & Search Engine *******************"
echo "**** (C) by Michael Peter Christen, usage granted under the GPL Version 2 ****"
echo "**** USE AT YOUR OWN RISK! Project home and releases: http://yacy.net/yacy ****"
echo "** LOG of YaCy: DATA/LOG/yacy00.log (and yacy<xx>.log) **"
echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **"
echo "** GET HELP for YaCy: see www.yacy-websearch.net/wiki and www.yacy-forum.de **"
echo "*******************************************************************************"
echo " >> YaCy started as daemon process. Administration at http://localhost:8080 << "
eval $cmdline
if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then
tail -f DATA/LOG/yacy00.log
fi
fi
Loading…
Cancel
Save