Ignore:
Timestamp:
Jun 24, 2010, 3:23:10 PM (14 years ago)
Author:
waue
Message:

修改 work path 以及 設定系統路徑

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nutchez-0.2/src/shell/nutchez

    r210 r219  
    1818Tomcat_HOME="/opt/nutchez/tomcat"
    1919NutchEZ_HOME="/home/nutchuser/nutchez"
    20 Work_Path="./"
    21 Work_Path_J=0
    22 
    23 # Work Path setup
    24 echo $0 | grep '/' || Work_Path_J=1
    25 if [ "$Work_Path_J" == "0"  ]; then
    26   Work_Path=$(echo $0 | sed 's/nutchez//')
    27 fi
     20Work_Path=
     21
     22#Work_Path="./"
     23#Work_Path_J=0
     24##  Work Path setup ##
     25#echo $0 | grep '/' || Work_Path_J=1
     26#if [ "$Work_Path_J" == "0"  ]; then
     27# Work_Path=$(echo $0 | sed 's/nutchez//')
     28#fi
    2829
    2930# [Env Declaration] #
     
    5657
    5758    echo -e "$pre_check_echo_1"
    58     ./duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
    59     su root -c "./duplicate_del /etc/hosts && ./add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
     59    $Work_Path/duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
     60    su root -c "$Work_Path/duplicate_del /etc/hosts && $Work_Path/add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
    6061    # 若密碼輸入失敗則跳出
    6162    if [ $? == "1" ]; then
     
    6970
    7071    echo -e "$pre_check_echo_1"
    71     ./duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
    72     su root -c "./duplicate_del /etc/hosts && ./add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
     72    $Work_Path/duplicate_del "${NutchEZ_HOME}/system/nutch_nodes"
     73    su root -c "$Work_Path/duplicate_del /etc/hosts && $Work_Path/add_hosts ${NutchEZ_HOME}/system/nutch_nodes /etc/hosts"
    7374    # 若密碼輸入失敗則跳出                   
    7475    if [ $? == "1" ]; then                   
Note: See TracChangeset for help on using the changeset viewer.