From 507afa7d6eaaa9d882dcae6bf6745d29d6865152 Mon Sep 17 00:00:00 2001 From: low012 Date: Sun, 29 Jul 2007 15:29:49 +0000 Subject: [PATCH] *) start script should be POSIX compliant now, solution as suggested by Fuchs in http://forum.yacy-websuche.de/viewtopic.php?t=203 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4008 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- startYACY.sh | 29 ++++++++--------------------- 1 file changed, 8 insertions(+), 21 deletions(-) diff --git a/startYACY.sh b/startYACY.sh index 925b93002..5978e1fc3 100755 --- a/startYACY.sh +++ b/startYACY.sh @@ -75,37 +75,18 @@ done #echo $options;exit 0 #DEBUG for getopts -# 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 -CLASSPATH="classes:.:htroot:$CLASSPATH" - #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`; - if [ $OS = "SunOS" ] - then - j=`$JAVA -classpath $CLASSPATH truncate "$j" "javastart_$i="`; - else - j="${j#javastart_$i=}"; - fi + j=$(grep javastart_$i DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'); if [ -n $j ]; then JAVA_ARGS="-$j $JAVA_ARGS"; fi; done # Priority - j=`grep javastart_priority DATA/SETTINGS/httpProxy.conf`; - - if [ $OS = "SunOS" ] - then - j=`$JAVA -classpath $CLASSPATH truncate "$j" "javastart_priority="`; - else - j="${j#javastart_priority=}" - fi + j=$(grep javastart_priority DATA/SETTINGS/httpProxy.conf | sed 's/^[^=]*=//'); if [ ! -z "$j" ];then if [ -n $j ]; then JAVA="nice -n $j $JAVA"; fi; @@ -119,6 +100,12 @@ fi #echo "JAVA_ARGS: $JAVA_ARGS" #echo "JAVA: $JAVA" +# 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 +CLASSPATH="classes:.:htroot:$CLASSPATH" + cmdline=""; if [ $DEBUG -eq 1 ] #debug then