Add headless AWT, nice level and memory parameters to the init script. It should work like the startYACY.sh now.

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4156 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
fuchsi 18 years ago
parent ce0bb1dc8a
commit e255888095

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/sh
#
# init script for the HTTP Proxy: YaCy
#
@ -7,9 +7,11 @@
# ensure java is in the path
PATH=/sbin:/bin:/usr/sbin:/usr/local/bin:/usr/bin
# installation directory
DAEMON_DIR=/opt/yacy
#DAEMON_DIR=/opt/yacy
DAEMON_DIR=/home/fox/daten/dev/eclipse/yacy
# set to the user whose rights the proxy will gain
USER=yacy
#USER=yacy
USER=fox
# Set this to the maximum number of seconds the script should try to shutdown
# yacy. You might want to increase this on slower peers or for bigger
# databases.
@ -18,8 +20,31 @@ SHUTDOWN_TIMEOUT=20
# Don't run if not installed
test -f $DAEMON_DIR/startYACY.sh || exit 0
# generating the proper classpath
cd $DAEMON_DIR
# Default niceness if not set in config file
NICE_VAL=0
JAVA_ARGS="-Djava.awt.headless=true"
#get javastart args
if [ -f DATA/SETTINGS/httpProxy.conf ]
then
# startup memory
for i in Xmx Xms; do
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 | sed 's/^[^=]*=//'`";
if [ ! -z "$j" ];then
if [ -n $j ]; then NICE_VAL=$j; fi;
fi
fi
# 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
@ -44,7 +69,8 @@ case "$1" in
echo -n "Starting $DESC: "
start-stop-daemon --start --background --make-pidfile --chuid $USER\
--pidfile $PID_FILE --chdir $DAEMON_DIR --startas $JAVA\
-- -classpath $CLASSPATH yacy $DAEMON_DIR > yacy.log
--nicelevel $NICE_VAL\
-- $JAVA_ARGS -classpath $CLASSPATH yacy $DAEMON_DIR
echo "$NAME."
;;

@ -71,7 +71,6 @@
<input type="hidden" name="prefermaskfilter" value="#[prefermaskfilter]#" />
<input type="hidden" name="depth" value="#[depth]#" />
<input type="hidden" name="cat" value="#[cat]#" />
<!--<input type="hidden" name="type" value="#[type]#" />-->
<input type="hidden" name="display" value="#[display]#" />
<input type="hidden" name="input" value="#[input]#" />
<input type="hidden" name="constraint" value="#[constraint]#" />

Loading…
Cancel
Save