|
@@ -1,4 +1,51 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
source /etc/profile
|
|
|
-nohup /usr/java/jdk1.6.0_21/bin/java -server -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+UseConcMarkSweepGC -Xmx4g -Xms4g -Xmn2g -classpath $CLASSPATH com.easou.ps.misc.main.MiscServer $SEARCH_PORT $HTTP_PORT $WEB_ROOT > $LOG_FILE
|
|
|
+#!/bin/bash
|
|
|
+
|
|
|
+echo
|
|
|
+echo "####################### miscSearch starting ########################"
|
|
|
+echo
|
|
|
+
|
|
|
+HOME=$(cd "$(dirname $0)"; pwd)
|
|
|
+echo "miscSearch.home = $HOME"
|
|
|
+cd $HOME
|
|
|
+
|
|
|
+## use ../conf as config dir for online deployment(OP), use etc for development(RD)
|
|
|
+if [ -d "../conf" ]; then
|
|
|
+ conf=../conf
|
|
|
+else
|
|
|
+ conf=etc
|
|
|
+fi
|
|
|
+
|
|
|
+ETC=$(cd "$conf"; pwd)
|
|
|
+echo "config.dir = $ETC"
|
|
|
+
|
|
|
+LIB=lib
|
|
|
+LOG_FILE=miscSearch.log
|
|
|
+
|
|
|
+SEARCH_PORT_LINE=$(grep "search.port" $ETC/sys.properties)
|
|
|
+SEARCH_PORT=${SEARCH_PORT_LINE##search.port=}
|
|
|
+
|
|
|
+HTTP_PORT_LINE=$(grep "http.port" $ETC/sys.properties)
|
|
|
+HTTP_PORT=${HTTP_PORT_LINE##http.port=}
|
|
|
+
|
|
|
+WEB_ROOT=webRoot
|
|
|
+
|
|
|
+CLASSPATH=$HOME:$ETC
|
|
|
+for f in $LIB/*.jar; do
|
|
|
+ CLASSPATH=${CLASSPATH}:$f;
|
|
|
+done
|
|
|
+
|
|
|
+#echo "CLASSPATH = $CLASSPATH"
|
|
|
+
|
|
|
+if [ -f "$LOG_FILE" ]; then
|
|
|
+ mv $LOG_FILE ${LOG_FILE}.bak
|
|
|
+fi
|
|
|
+nohup java -server -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime -XX:+UseConcMarkSweepGC -Xmx4g -Xms4g -Xmn2g -classpath $CLASSPATH com.easou.ps.misc.main.MiscServer $SEARCH_PORT $HTTP_PORT $WEB_ROOT > $LOG_FILE
|
|
|
+
|
|
|
+ip=`/sbin/ifconfig eth0 | grep "inet addr" | cut -d':' -f2 | cut -d' ' -f1`
|
|
|
+
|
|
|
+echo
|
|
|
+echo "####################### miscSearch started ########################"
|
|
|
+echo
|