Index: nutchez-0.1/bin/nutchez
===================================================================
--- nutchez-0.1/bin/nutchez	(revision 90)
+++ nutchez-0.1/bin/nutchez	(revision 91)
@@ -7,18 +7,16 @@
 # begining ..
 
-#bin=`dirname "$0"`
-#bin=`cd "$bin"; pwd`
 
 #. "$bin"/nutchez-func.sh
 
+  export JAVA_HOME=/usr/lib/jvm/java-6-sun
+  export NUTCH_HOME=/opt/nutch
+#  export HADOOP_HOME=/opt/nutch
   export NUTCH_CONF_DIR=~/.nutchez/conf
-  export HADOOP_CONF_DIR=~/.nutchez/conf
+#  export HADOOP_CONF_DIR=~/.nutchez/conf
   export NUTCH_LOG_DIR=~/.nutchez/log
 
-if [ $JAVA_HOME = "" ];then
-  export JAVA_HOME=/usr/lib/jvm/java-6-sun
-fi
 
-#  export NUTCH_HOME=/opt/nutch
+
 
 . /opt/nutch/bin/nutchez-func.sh
Index: nutchez-0.1/bin/nutchez-func.sh
===================================================================
--- nutchez-0.1/bin/nutchez-func.sh	(revision 90)
+++ nutchez-0.1/bin/nutchez-func.sh	(revision 91)
@@ -20,11 +20,8 @@
     chown -R $LOGNAME:$LOGNAME ~/.nutchez
   fi
-#  export NUTCH_CONF_DIR=~/.nutchez
-#  export HADOOP_CONF_DIR=~/.nutchez
-#  export HADOOP_LOG_DIR=~/.nutchez/log
-#  . ~/.nutchez/hadoop-env.sh || . /etc/nutch/hadoop-env.sh
-}
-
-echo_vb () {
+  
+}
+
+echo_dialog_v () {
   if [ $VERB -eq 1 ]; then
     $DIALOG --msgbox "$1" 16 51
@@ -34,8 +31,8 @@
 test_file () {
   if ! test -e "$1" ; then
-    echo_vb "test_file: \n can not find $1"
+    echo_dialog_v "test_file: \n can not find $1"
     echo "" >  $1
   else
-     echo_vb "test_file: \n Touch  $1 ! \n Its content is \n `cat $1`"
+     echo_dialog_v "test_file: \n Touch  $1 ! \n Its content is \n `cat $1`"
   fi
 }
@@ -43,6 +40,6 @@
 check_if_root() {
    if [ ! "$UID" = "0" ]; then
-     echo_vb "Hi [$LOGNAME] !! "
-     echo_vb "You need to run this script \"`basename $0`\" as root."
+     echo_dialog_v "Hi [$LOGNAME] !! "
+     echo_dialog_v "You need to run this script \"`basename $0`\" as root."
      exit 1
    fi
@@ -50,5 +47,5 @@
 
 promote_tempfile () {
-  echo_vb "7. chang tmp as txt"
+  echo_dialog_v "7. chang tmp as txt"
   rm ~/.nutchez/sav/n.*.txt
   mv /tmp/n.urls.tmp ~/.nutchez/sav/n.urls.txt
@@ -59,5 +56,5 @@
 
 clean_tempfile () {
-  echo_vb "7. delete tmp"
+  echo_dialog_v "7. delete tmp"
   rm /tmp/n.*.tmp
 }
@@ -75,7 +72,7 @@
   cp ~/.nutchez/sav/n.urls.txt ~/.nutchez/urls/urls.txt
 
-  if [ -e ~/.nutchez/nutch-site.xml ] ; then
+  if [ -e ~/.nutchez/conf/nutch-site.xml ] ; then
     # set nutch-site.xml
-    sed -i -e "4s/<value>[a-zA-Z0-9]*</<value>$ROBOT</" ~/.nutchez/nutch-site.xml
+    sed -i -e "4s/<value>[a-zA-Z0-9]*</<value>$ROBOT</" ~/.nutchez/conf/nutch-site.xml
   fi
 
@@ -99,11 +96,11 @@
 show_urls (){
   # show urls : ok =0 ,cancel = 1
-  echo_vb "2. show_urls !"
+  echo_dialog_v "2. show_urls !"
   test_file  ~/.nutchez/sav/n.urls.txt
-  echo_vb "2.1 test_file ~/.nutchez/sav return : $?"
+  echo_dialog_v "2.1 test_file ~/.nutchez/sav return : $?"
   # dialog begin
   dialog --title "The URLS that you want" --editbox ~/.nutchez/sav/n.urls.txt 16 51 2>/tmp/n.urls.tmp
   RET=$?
-  echo_vb "2.1 cat url: `cat /tmp/n.urls.tmp`"
+  echo_dialog_v "2.1 cat url: `cat /tmp/n.urls.tmp`"
   return $RET
 }
@@ -111,26 +108,26 @@
 setup_robot () {
   test_file ~/.nutchez/sav/n.robot.txt
-  echo_vb "3. setup_robot"
+  echo_dialog_v "3. setup_robot"
   # dialog
   dialog --nocancel --inputbox " This agent name \n" 16 51 "`cat ~/.nutchez/sav/n.robot.txt`" 2>/tmp/n.robot.tmp
-  echo_vb "3.1 cat robot : `cat /tmp/n.robot.tmp`"
+  echo_dialog_v "3.1 cat robot : `cat /tmp/n.robot.tmp`"
 }
 
 setup_crawler () {
-  echo_vb "4. setup_crawler"
+  echo_dialog_v "4. setup_crawler"
   test_file ~/.nutchez/sav/n.crawler.txt
   dialog --nocancel --inputbox " Depth  \n " 16 51 "`cat ~/.nutchez/sav/n.crawler.txt`" 2>/tmp/n.crawler.tmp
-  echo_vb "4.1 cat robot : `cat /tmp/n.robot.tmp`"
+  echo_dialog_v "4.1 cat robot : `cat /tmp/n.robot.tmp`"
 }
 
 setup_tomcat () {
-  echo_vb "5. setup_tomcat"
+  echo_dialog_v "5. setup_tomcat"
   test_file ~/.nutchez/sav/n.tomcat.txt
   dialog --nocancel --inputbox " explorer port \n " 16 51 "`cat ~/.nutchez/sav/n.tomcat.txt`" 2>/tmp/n.tomcat.tmp
-  echo_vb "5.1 cat tomcat : `cat /tmp/n.tomcat.tmp`"
+  echo_dialog_v "5.1 cat tomcat : `cat /tmp/n.tomcat.tmp`"
 }
 
 final_confirm () {
-  echo_vb "6. final_confirm : start =0 , back =1 "
+  echo_dialog_v "6. final_confirm : start =0 , back =1 "
   tempfile=/tmp/n.finalcheck.tmp
 
@@ -145,5 +142,5 @@
 
   MSG=`cat $tempfile`
-  echo_vb "6.1 final message :\n $MSG"
+  echo_dialog_v "6.1 final message :\n $MSG"
   #read READ
   $DIALOG --title "Check It !!" --clear \
@@ -151,5 +148,5 @@
         --yesno "$MSG" 26 51
   RET=$?
-  echo_vb "final return = $RET"
+  echo_dialog_v "final return = $RET"
   return $RET
 }
@@ -165,15 +162,15 @@
 start_crawl () {
 
-  echo_vb "7. start_crawl"
+  echo_dialog_v "7. start_crawl"
   setup_nutchez
   install_tomcat
-  echo_vb "/opt/nutch/bin/nutch crawl ~/.nutchez/urls -dir ~/.nutchez/search -depth $DEPTH"
-  echo_vb "nutch conf dir = $NUTCH_CONF_DIR"
+  echo_dialog_v "/opt/nutch/bin/nutch crawl ~/.nutchez/urls -dir ~/.nutchez/search -depth $DEPTH"
+  echo_dialog_v "nutch conf dir = $NUTCH_CONF_DIR"
   /opt/nutch/bin/nutch crawl ~/.nutchez/urls -dir ~/.nutchez/search -depth $DEPTH -topN 5000 -threads 1000
 }
 
 start_tomcat () {
-  echo_vb "8. start_tomcat "
-  echo_vb "/opt/nutch/tomcat/bin/startup.sh"
+  echo_dialog_v "8. start_tomcat "
+  echo_dialog_v "/opt/nutch/tomcat/bin/startup.sh"
   if [ -e /tmp/search ];then
     rm -rf /tmp/search
@@ -181,7 +178,7 @@
   ln -sf ~/.nutchez/search/ /tmp/
 
-  pid_tc=$(ps axw -eo pid,command | \
-      grep "org.apache.catalina.startup.Bootstrap"\
-      | grep "start" | awk '{print $1}')
+  pid_tc=$(ps axw -eo pid,command |\
+ grep "catalina.startup.Bootstrap" |\
+ grep "start" | awk '{print $1}')
   if [ -z "$pid_tc" ]; then
       echo "starting tomcat"
@@ -201,5 +198,5 @@
 
 show_report () {
-  echo_vb "9. show_report "
+  echo_dialog_v "9. show_report "
   FIREFOX=`which firefox`
   RET=$?
