#!/usr/bin/env sh JAVA="`which java`" CONFIGFILE="DATA/SETTINGS/yacy.conf" LOGFILE="yacy.log" PIDFILE="yacy.pid" OS="`uname`" #get javastart args JAVA_ARGS="-server -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djsse.enableSNIExtension=false"; #rem -Djsse.enableSNIExtension=false fix a ssl problem in Java 1.7, see http://teknosrc.com/javax-net-ssl-sslprotocolexception-handshake-alert-unrecognized_name-solved/ #JAVA_ARGS="-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails $JAVA_ARGS"; #check if OS is Sun Solaris or one of the OpenSolaris distributions and use different version of id if necessary if [ $OS = "SunOS" ] then # only this version of id supports the parameter -u ID="/usr/xpg4/bin/id" else # regular id for any other case (especially Linux and OSX) ID="id" fi if [ ! -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 usage() { cat - <.log) **" echo "** STOP YaCy: execute stopYACY.sh and wait some seconds **" echo "** GET HELP for YaCy: see http://wiki.yacy.net and http://forum.yacy.de **" echo "*******************************************************************************" if [ $DEBUG -eq 1 ] #debug then # with exec the java process become the main process and will receive signals such as SIGTERM exec $cmdline elif [ $FOREGROUND -eq 1 ];then # foreground process without remote JMX monitoring # with exec the java process become the main process and will receive signals such as SIGTERM exec $cmdline else echo " >> YaCy started as daemon process. Administration at http://localhost:$PORT << " eval $cmdline if [ "$TAILLOG" -eq "1" -a ! "$DEBUG" -eq "1" ];then sleep 1 tail -f DATA/LOG/yacy00.log fi fi fi