Changeset 213 for nutchez-0.2/src
- Timestamp:
- Jun 21, 2010, 9:49:42 AM (14 years ago)
- Location:
- nutchez-0.2/src/test
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install_func.sh
r209 r213 282 282 debug_info "$install_nutch_package_d1" 283 283 tar -zxvf /home/nutchuser/nutchez/source/NutchezForClientOf_$Master_IP_Address.tar.gz -C /opt/nutchez 284 cp /etc/hosts /home/nutchuser/nutchez/system/hosts.bak 284 285 sed -i '1a '$Master_IP_Address' '$Master_Hostname'' /etc/hosts 285 286 #/opt/nutchez/nutch/bin/hadoop-daemon.sh start datanode -
nutchez-0.2/src/test/client_remove.sh
r206 r213 36 36 debug_info "check_root" 37 37 if [ $USER != "root" ]; then 38 show_info "$ check_root_1" # "請切換成 root 身份執行移除程式!!!"38 show_info "$CR_check_root_1" # "請切換成 root 身份執行移除程式!!!" 39 39 exit 40 40 fi 41 show_info "$ check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"41 show_info "$CR_check_root_2" # "已確認為root身份, 將繼續執行此移除程式!" 42 42 } 43 43 44 44 # shutdown service 45 45 function shutdown_service () { 46 show_info "$ shutdown_service_echo_1" # "關閉本機服務..."46 show_info "$CR_shutdown_service_echo_1" # "關閉本機服務..." 47 47 su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop datanode" 48 48 su nutchuser -c "/opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker" 49 show_info "$ shutdown_service_echo_2" # "本機服務已關閉"49 show_info "$CR_shutdown_service_echo_2" # "本機服務已關閉" 50 50 } 51 51 52 52 # 移除檔案及資料夾 53 53 function remove_folders () { 54 show_info "$ remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."54 show_info "$CR_remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..." 55 55 rm -rf /opt/nutchez 56 56 rm -rf /var/nutchez 57 show_info "$ remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"57 show_info "$CR_remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除" 58 58 } 59 59 … … 61 61 # 還原/etc/hosts 62 62 function edit_hosts () { 63 show_info "$edit_hosts_echo_1" # "修改/etc/hosts..." 64 Line_NO=`cat /etc/hosts | grep -n $Master_IP_Address | sed 's/:.*//g'` 65 if [[ $Line_NO -ge 1 ]]; then 66 sed -i ''$Line_NO'd' /etc/hosts 67 fi 68 show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts" 63 show_info "$CR_edit_hosts_echo_1" # "修改/etc/hosts..." 64 # Line_NO=`cat /etc/hosts | grep -n $Master_IP_Address | sed 's/:.*//g'` 65 # if [[ $Line_NO -ge 1 ]]; then 66 # sed -i ''$Line_NO'd' /etc/hosts 67 # fi 68 cat > /etc/hosts < /home/nutchuser/nutchez/system/hosts.bak 69 show_info "$CR_edit_hosts_echo_2" # "完成修改/etc/hosts" 69 70 } 70 71 … … 72 73 # 移除使用者 73 74 function user_delete () { 74 show_info "$ user_delete_echo_1" # "正在刪除nutchuser使用者..."75 show_info "$CR_user_delete_echo_1" # "正在刪除nutchuser使用者..." 75 76 userdel -r nutchuser 76 show_info "$ user_delete_echo_2" # "使用者nutchuser已刪除"77 show_info "$CR_user_delete_echo_2" # "使用者nutchuser已刪除" 77 78 } 78 79 79 80 # Main function 80 81 function main () { 81 show_info "$ main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"82 show_info "$ main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"82 show_info "$CR_main_echo_1" #"警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!" 83 show_info "$CR_main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號" 83 84 # 詢問是否繼續 84 read -p "$ main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"85 read -p "$CR_main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消" 85 86 # 確認移除 86 87 if [ $confirm -eq 1 ]; then … … 90 91 edit_hosts 91 92 user_delete 92 show_info "$ main_echo_4" # "移除程序已完成!"93 show_info "$CR_main_echo_4" # "移除程序已完成!" 93 94 elif [ $confirm -eq 2 ]; then 94 show_info "$ main_echo_5" # "您已取消移除程序!"95 show_info "$ main_echo_6" # "若要移除請再重新執行!"95 show_info "$CR_main_echo_5" # "您已取消移除程序!" 96 show_info "$CR_main_echo_6" # "若要移除請再重新執行!" 96 97 fi 97 98 } -
nutchez-0.2/src/test/install
r206 r213 14 14 # Source functions 15 15 source $Work_Path/install_func.sh 16 source $Work_Path/ install_lang.zh16 source $Work_Path/lang_link 17 17 ### real code ##### 18 18 … … 28 28 main () { 29 29 check_info 30 show_info "$ main_echo_1"30 show_info "$MI_main_echo_1" 31 31 # show_info "歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定密碼" 32 32 set_install_information 33 33 show_master_info 34 read -p "$ main_echo_2" confirm34 read -p "$MI_main_echo_2" confirm 35 35 # read -p "Please confirm your install infomation: 1.Yes 2.No " confirm 36 36 if [ $confirm -eq 1 ]; then … … 39 39 # 解壓縮 40 40 tar -zxvf nutchezV2-current.tar.gz -C /opt/ 41 41 42 su nutchuser -c "mkdir /home/nutchuser/nutchez" 43 su nutchuser -c "mkdir /home/nutchuser/nutchez/urls" 44 su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt" 45 su nutchuser -c "mkdir /home/nutchuser/nutchez/search" 46 su nutchuser -c "mkdir /home/nutchuser/nutchez/source" 47 su nutchuser -c "mkdir /home/nutchuser/nutchez/system" 48 42 49 Install_Nutch 43 50 … … 45 52 chown -R nutchuser:nutchuser /opt/nutchez 46 53 chown -R nutchuser:nutchuser /var/nutchez 47 su nutchuser -c "mkdir /home/nutchuser/nutchez"48 su nutchuser -c "mkdir /home/nutchuser/nutchez/urls"49 su nutchuser -c "touch /home/nutchuser/nutchez/urls/urls.txt"50 su nutchuser -c "mkdir /home/nutchuser/nutchez/search"51 su nutchuser -c "mkdir /home/nutchuser/nutchez/source"52 su nutchuser -c "mkdir /home/nutchuser/nutchez/system"53 54 54 55 make_client_install … … 58 59 start_up_tomcat 59 60 # 安裝流程結束,並進入網頁管理頁面設定爬網網址...等 60 show_info "$ main_echo_3"61 show_info "$MI_main_echo_3" 61 62 # show_info "Install Successfully!!" 62 show_info "$ main_echo_4"63 show_info "$MI_main_echo_4" 63 64 # show_info "Visit http://$MasterIP_Address:8080" 64 65 client_install_commands -
nutchez-0.2/src/test/install_func.sh
r206 r213 1 1 #!/bin/bash 2 source $Work_Path/ install_lang2 source $Work_Path/lang_link 3 3 ####### garbage here ############# 4 4 function mainFunction ( ) … … 65 65 debug_info "check_root" 66 66 if [ $USER != "root" ]; then 67 show_info "$ check_root_1"67 show_info "$MI_check_root_1" 68 68 exit 69 69 fi 70 show_info "$ check_root_2"70 show_info "$MI_check_root_2" 71 71 } 72 72 73 73 function check_systemInfo(){ 74 debug_info "$ check_sys_1"75 show_info "$ check_sys_2"74 debug_info "$MI_check_sys_1" 75 show_info "$MI_check_sys_2" 76 76 Linux_Distribution=$(lsb_release -a 2> /dev/null | grep "Distributor ID:" | awk '{print $3}') 77 77 Linux_Version=$(lsb_release -a 2> /dev/null | grep "Release" | awk '{print $2}') … … 81 81 function install_packages(){ 82 82 # deb 系列系統 83 debug_info "$ install_pack_1"84 debug_info "$ install_pack_2"83 debug_info "$MI_install_pack_1" 84 debug_info "$MI_install_pack_2" 85 85 if [ "$Linux_Distribution" == "Ubuntu" ] || [ "$Linux_Distribution" == "Debian" ] ;then 86 echo -e "\n$ install_pack_if_1\n"86 echo -e "\n$MI_install_pack_if_1\n" 87 87 aptitude install -y expect ssh dialog 88 88 # rpm 系列系統 89 89 elif [ "$Linux_Distribution" == "Fedora" ] || [ "$Linux_Distribution" == "CentOS" ] ;then 90 show_info "$ install_pack_if_2"91 else 92 show_info "$ install_pack_if_2"90 show_info "$MI_install_pack_if_2" 91 else 92 show_info "$MI_install_pack_if_2" 93 93 fi 94 94 } 95 95 96 96 function check_nez_installed(){ 97 debug_info "$ check_nez_1"97 debug_info "$MI_check_nez_1" 98 98 if [ -d "/opt/nutchez" ]; then 99 show_info "$ check_nez_2"99 show_info "$MI_check_nez_2" 100 100 exit 101 101 else 102 show_info "$ check_nez_3"102 show_info "$MI_check_nez_3" 103 103 fi 104 104 } 105 105 106 106 function check_sunJava(){ 107 debug_info "$ check_sunJava_1"108 debug_info "$ check_sunJava_2"107 debug_info "$MI_check_sunJava_1" 108 debug_info "$MI_check_sunJava_2" 109 109 110 110 javaPath="/usr" … … 118 118 119 119 if [ "$JAVA_org" == "" ]; then 120 show_info "$ check_sunJava_if_1"121 show_info "$ check_sunJava_if_2"122 show_info "$ check_sunJava_if_3"123 read -p "$ check_sunJava_if_4" choice120 show_info "$MI_check_sunJava_if_1" 121 show_info "$MI_check_sunJava_if_2" 122 show_info "$MI_check_sunJava_if_3" 123 read -p "$MI_check_sunJava_if_4" choice 124 124 case $choice in 125 125 "1") 126 show_info "$ check_sunJava_if_5"126 show_info "$MI_check_sunJava_if_5" 127 127 exit 128 128 ;; 129 129 "2") 130 read -p "$ check_sunJava_if_6" javaPath130 read -p "$MI_check_sunJava_if_6" javaPath 131 131 ;; 132 132 "*") … … 141 141 142 142 if [ "$JAVA_org" == "" ]; then 143 show_info "$ check_sunJava_if_7"143 show_info "$MI_check_sunJava_if_7" 144 144 exit 145 145 fi … … 149 149 large16=$(echo "$JAVA_version >= 1.6" | bc) 150 150 if [ "${large16}" == 0 ]; then 151 show_info "$ check_sunJava_if_8"151 show_info "$MI_check_sunJava_if_8" 152 152 exit 153 153 fi 154 154 155 show_info "$ check_sunJava_if_9"156 else 157 show_info "$ check_sunJava_if_10"155 show_info "$MI_check_sunJava_if_9" 156 else 157 show_info "$MI_check_sunJava_if_10" 158 158 exit 159 159 fi … … 165 165 # 檢查是否有安裝openssh, openssh-server 166 166 function check_ssh(){ 167 debug_info "$ check_ssh_1"167 debug_info "$MI_check_ssh_1" 168 168 if [ -e /usr/bin/ssh ]; then 169 show_info "$ check_ssh_2"170 else 171 show_info "$ check_ssh_3"169 show_info "$MI_check_ssh_2" 170 else 171 show_info "$MI_check_ssh_3" 172 172 exit 173 173 fi 174 174 175 175 if [ -e /usr/sbin/sshd ]; then 176 show_info "$ check_ssh_4"177 else 178 show_info "$ check_ssh_5"176 show_info "$MI_check_ssh_4" 177 else 178 show_info "$MI_check_ssh_5" 179 179 exit 180 180 fi … … 184 184 # 檢查是否有安裝dialog 185 185 function check_dialog(){ 186 debug_info "$ check_dialog_1"186 debug_info "$MI_check_dialog_1" 187 187 if [ -e /usr/bin/dialog ]; then 188 show_info "$ check_dialog_2"189 else 190 show_info "$ check_dialog_3"188 show_info "$MI_check_dialog_2" 189 else 190 show_info "$MI_check_dialog_3" 191 191 exit 192 192 fi … … 210 210 211 211 function set_nutchuser_passwd () { 212 read -sp "$ set_nutchuser_passwd_echo_1" Nutchuser_Passwd212 read -sp "$MI_set_nutchuser_passwd_echo_1" Nutchuser_Passwd 213 213 # read -sp "Please enter nutchuser's password : " Nutchuser_Passwd 214 214 echo -e "\n" 215 read -sp "$ set_nutchuser_passwd_echo_2" Nutchuser_Passwd2215 read -sp "$MI_set_nutchuser_passwd_echo_2" Nutchuser_Passwd2 216 216 # read -sp "Please enter nutchuser's password again: " Nutchuser_Passwd2 217 217 echo -e "\n" … … 273 273 else 274 274 declare -i i=1 275 show_info "$ select_eth_echo_1"275 show_info "$MI_select_eth_echo_1" 276 276 # show_info "\nSystem have multiple network device, which network use for this machine: " 277 277 … … 281 281 i=i+1 282 282 done 283 read -p "$ select_eth_echo_2" net_choice283 read -p "$MI_select_eth_echo_2" net_choice 284 284 # read -p "Please choice(1/2/3...): " net_choice 285 285 if [ -z $net_choice ]; then … … 287 287 fi 288 288 289 show_info "$ select_eth_echo_3 $net_choice"289 show_info "$MI_select_eth_echo_3 $net_choice" 290 290 # show_info "Your choice is $net_choice" 291 291 net_interface=$(echo $net_interfaces | cut -d " " -f $net_choice) … … 294 294 net_MacAddr=$(ifconfig $net_interface | grep 'HW' | sed 's/^.*HWaddr //g') 295 295 296 show_info "$ select_eth_echo_4 $net_address"296 show_info "$MI_select_eth_echo_4 $net_address" 297 297 # show_info "net_address is $net_address" 298 show_info "$ select_eth_echo_5 $net_MacAddr"298 show_info "$MI_select_eth_echo_5 $net_MacAddr" 299 299 # show_info "net_MacAddr is $net_MacAddr" 300 300 fi … … 303 303 304 304 function show_master_info () { 305 show_info "$ show_master_info_echo_1 $MasterIP_Address"306 show_info "$ show_master_info_echo_2 $net_MacAddr"305 show_info "$MI_show_master_info_echo_1 $MasterIP_Address" 306 show_info "$MI_show_master_info_echo_2 $net_MacAddr" 307 307 308 308 # show_info "The Master IP Address is $MasterIP_Address" … … 311 311 312 312 function make_ssh_key () { 313 debug_info "$ make_ssh_key_echo_1"313 debug_info "$MI_make_ssh_key_echo_1" 314 314 # debug_info "Make ssh key(begin...)" 315 315 su nutchuser -c 'ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ""' 316 316 su nutchuser -c "cp ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys" 317 317 su nutchuser -c "ssh-add /home/nutchuser/.ssh/id_rsa" 318 debug_info "$ make_ssh_key_echo_2"318 debug_info "$MI_make_ssh_key_echo_2" 319 319 # debug_info "Make ssh key(done!)" 320 320 } … … 322 322 323 323 function set_haoop-site () { 324 debug_info "$ set_haoop_site_echo_1"324 debug_info "$MI_set_haoop_site_echo_1" 325 325 # debug_info "set hadoop-site.xml(begin...)" 326 326 cd $Nutch_HOME/conf/ … … 341 341 </configuration> 342 342 EOF 343 debug_info "$ set_haoop_site_echo_2"343 debug_info "$MI_set_haoop_site_echo_2" 344 344 # debug_info "set hadoop-site.xml(done!)" 345 345 } … … 347 347 # 修改nutch-site.xml中-http.agent.url, http.agent.email 348 348 function set_nutch-site () { 349 debug_info "$ set_nutch_site_echo_1"349 debug_info "$MI_set_nutch_site_echo_1" 350 350 # debug_info "set nutch-site.xml(begin...)" 351 351 Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.url' | sed 's/:.*//g'` 352 debug_info "$ set_nutch_site_echo_2"352 debug_info "$MI_set_nutch_site_echo_2" 353 353 # debug_info "debug...http.agent.url line number = $Line_NO..." 354 354 sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml 355 debug_info "$ set_nutch_site_echo_3"355 debug_info "$MI_set_nutch_site_echo_3" 356 356 # debug_info "debug...edit http.agent.url delete line $((Line_NO+1))..." 357 357 sed -i ''$Line_NO'a <value>'$MasterIP_Address'</value>' $Nutch_HOME/conf/nutch-site.xml 358 debug_info "$ set_nutch_site_echo_4"358 debug_info "$MI_set_nutch_site_echo_4" 359 359 # debug_info "debug...edit http.agent.url done..." 360 360 361 361 Line_NO=`cat $Nutch_HOME'/conf/nutch-site.xml' | grep -n 'http.agent.email' | sed 's/:.*//g'` 362 debug_info "$ set_nutch_site_echo_5"362 debug_info "$MI_set_nutch_site_echo_5" 363 363 # debug_info "debug...http.agent.email line number = $Line_NO..." 364 364 365 365 sed -i ''$((Line_NO+1))'d' $Nutch_HOME/conf/nutch-site.xml 366 debug_info "$ set_nutch_site_echo_6"366 debug_info "$MI_set_nutch_site_echo_6" 367 367 # debug_info "debug...edit http.agent.email delete line $((Line_NO+1))..." 368 368 sed -i ''$Line_NO'a <value>'$Admin_email'</value>' $Nutch_HOME/conf/nutch-site.xml 369 debug_info "$ set_nutch_site_echo_7"369 debug_info "$MI_set_nutch_site_echo_7" 370 370 # debug_info "debug...edit http.agent.email done..." 371 debug_info "$ set_nutch_site_echo_8"371 debug_info "$MI_set_nutch_site_echo_8" 372 372 # debug_info "set nutch-site.xml(done!)" 373 373 } 374 374 375 375 function format_HDFS () { 376 debug_info "$ format_HDFS_echo_1"376 debug_info "$MI_format_HDFS_echo_1" 377 377 su nutchuser -c "$Nutch_HOME/bin/hadoop namenode -format" 378 debug_info "$ format_HDFS_echo_2"378 debug_info "$MI_format_HDFS_echo_2" 379 379 } 380 380 381 381 function start_up_NutchEZ (){ 382 debug_info "$ start_up_NutchEZ_echo_1"382 debug_info "$MI_start_up_NutchEZ_echo_1" 383 383 # debug_info "start up NutchEZ..." 384 384 su nutchuser -c "$Nutch_HOME/bin/start-all.sh" … … 387 387 388 388 function set_hosts () { 389 debug_info "$set_hosts_echo_1" 389 debug_info "$MI_set_hosts_echo_1" 390 cp /etc/hosts /home/nutchuser/nutchez/system/hosts.bak 390 391 Line_NO=`cat /etc/hosts | grep -n $(hostname) | sed 's/:.*//g'` 391 392 content=$(cat /etc/hosts | awk 'NR=='$Line_NO'{printf "# " ; print}' ) … … 395 396 396 397 function Install_Nutch () { 397 debug_info "$ install_Nutch_echo_1 $MasterIP_Address "398 debug_info "$MI_install_Nutch_echo_1 $MasterIP_Address " 398 399 # debug_info "MasterIP_Address=$MasterIP_Address" 399 debug_info "$ install_Nutch_echo_2 $(hostname)"400 debug_info "$MI_install_Nutch_echo_2 $(hostname)" 400 401 # debug_info "Master_Hostname=$(hostname)" 401 402 su nutchuser -c "echo $net_address $(hostname) $net_MacAddr \>\> ~/nutchez/system/nutch_nodes" … … 409 410 cd $Start_PATH 410 411 Line_NO=`cat client_install | grep -n '# Master IP here' | sed 's/:.*//g'` 411 debug_info "$ client_PassMasterIPAddr_echo_1"412 debug_info "$MI_client_PassMasterIPAddr_echo_1" 412 413 # debug_info "debug...Master IP here line number = $Line_NO..." 413 414 sed -i ''$((Line_NO+1))'d' client_install 414 debug_info "$ client_PassMasterIPAddr_echo_2"415 debug_info "$MI_client_PassMasterIPAddr_echo_2" 415 416 # debug_info "debug...edit Master IP at line $((Line_NO+1))..." 416 417 sed -i ''$Line_NO'a Master_IP_Address='$MasterIP_Address'' client_install 417 debug_info "$ client_PassMasterIPAddr_echo_3"418 debug_info "$MI_client_PassMasterIPAddr_echo_3" 418 419 # debug_info "edit client_install done..." 419 420 } … … 423 424 cd $Start_PATH 424 425 Line_NO=`cat client_install | grep -n '# Master Hostname here' | sed 's/:.*//g'` 425 debug_info "$ client_PassMaster_Hostname_echo_1"426 debug_info "$MI_client_PassMaster_Hostname_echo_1" 426 427 # debug_info "debug...Master hostname here line number = $Line_NO..." 427 428 sed -i ''$((Line_NO+1))'d' client_install 428 debug_info "$ client_PassMaster_Hostname_echo_2"429 debug_info "$MI_client_PassMaster_Hostname_echo_2" 429 430 # debug_info "debug...edit Master Hostname at line $((Line_NO+1))..." 430 431 sed -i ''$Line_NO'a Master_Hostname='$(hostname)'' client_install 431 debug_info "$ client_PassMaster_Hostname_echo_3"432 debug_info "$MI_client_PassMaster_Hostname_echo_3" 432 433 # debug_info "edit client_install done..." 433 434 } … … 448 449 # 打包安裝目錄(不含tomcat) 449 450 450 debug_info "$ make_client_install_echo_1"451 debug_info "$MI_make_client_install_echo_1" 451 452 # debug_info "function make_client_install..." 452 453 … … 460 461 mv NutchezForClientOf_$MasterIP_Address.tar.gz /home/nutchuser/nutchez/source 461 462 cp $Start_PATH/client_install $Start_PATH/client_install_func.sh /home/nutchuser/nutchez/source 463 # cp $Start_PATH/client_install $Start_PATH/client_install /home/nutchuser/nutchez/source 464 # cp $Start_PATH/client_install $Start_PATH/client_remove.sh /home/nutchuser/nutchez/source 465 # cp $Start_PATH/client_install $Start_PATH/lang* /home/nutchuser/nutchez/source 462 466 } 463 467 464 468 function start_up_tomcat () { 465 debug_info "$ start_up_tomcat_echo_1"469 debug_info "$MI_start_up_tomcat_echo_1" 466 470 # debug_info "start up tomcat..." 467 471 468 472 i=10 469 debug_info "$ start_up_tomcat_echo_2"473 debug_info "$MI_start_up_tomcat_echo_2" 470 474 until [ $i -lt 1 ] 471 475 do … … 474 478 done 475 479 su nutchuser -c "$Tomcat_HOME/bin/startup.sh" 476 debug_info "$ start_up_tomcat_echo_3"480 debug_info "$MI_start_up_tomcat_echo_3" 477 481 # debug_info "tomcat has been started..." 478 482 } … … 481 485 # client簡易步驟 482 486 function client_install_commands () { 483 show_info "$client_install_commands_echo_1" 484 show_info "$client_install_commands_echo_2" 485 show_info "$client_install_commands_echo_3" 486 show_info "$client_install_commands_echo_4" 487 show_info "$client_install_commands_echo_5" 488 show_info "$client_install_commands_echo_6" 489 show_info "$client_install_commands_echo_7" 490 487 show_info "$MI_client_install_commands_echo_1" 488 show_info "$MI_client_install_commands_echo_2" 489 show_info "$MI_client_install_commands_echo_3" 490 show_info "$MI_client_install_commands_echo_4" 491 show_info "$MI_client_install_commands_echo_5" 492 show_info "$MI_client_install_commands_echo_6" 493 show_info "$MI_client_install_commands_echo_7" 491 494 492 495 # show_info "Client Install Command as Follows:" -
nutchez-0.2/src/test/lang/lang_zh_TW
r211 r213 10 10 11 11 ############ Lang for master_install -Start ############ 12 main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定>密碼"13 main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確"14 main_echo_3="安裝成功!"15 main_echo_4="請進入管理頁面:http://$MasterIP_Address:8080"12 MI_main_echo_1="歡迎使用NutchEZ, 此安裝程序會為您新建一個nutchuser帳號並協助您設定>密碼" 13 MI_main_echo_2="請確認上述的安裝資訊:1.正確 2.不正確" 14 MI_main_echo_3="安裝成功!" 15 MI_main_echo_4="請進入管理頁面:http://$MasterIP_Address:8080" 16 16 17 17 ## Lang for master_install_func.sh ## 18 18 ### [for choose_lang()] ### 19 choose_lang_1="請選擇語言: (1)English (2)中文"20 choose_lang_2="(1/2):"19 MI_choose_lang_1="請選擇語言: (1)English (2)中文" 20 MI_choose_lang_2="(1/2):" 21 21 22 22 ### [for check_root()]### 23 check_root_1="請切換成 root 身份執行!!!"24 check_root_2="身份是 root"23 MI_check_root_1="請切換成 root 身份執行!!!" 24 MI_check_root_2="身份是 root" 25 25 26 26 ### [for check_systemInfo()]### 27 check_sys_1="check_systemInfo"28 check_sys_2="作業系統為: "27 MI_check_sys_1="check_systemInfo" 28 MI_check_sys_2="作業系統為: " 29 29 30 30 ### [for install_packages()]### 31 install_pack_1="install_packages"32 install_pack_2="檢查套件相依性"33 install_pack_if_1="將會安裝 expect, ssh 和 dialog 套件"34 install_pack_if_2="請手動安裝 expect, ssh 和 dialog 套件"31 MI_install_pack_1="install_packages" 32 MI_install_pack_2="檢查套件相依性" 33 MI_install_pack_if_1="將會安裝 expect, ssh 和 dialog 套件" 34 MI_install_pack_if_2="請手動安裝 expect, ssh 和 dialog 套件" 35 35 36 36 ### [for check_nez_installed()] ### 37 check_nez_1="chcheck_nez_installed"38 check_nez_2="系統先前已安裝NutchEz"39 check_nez_3="系統尚未安裝 NutchEz"37 MI_check_nez_1="chcheck_nez_installed" 38 MI_check_nez_2="系統先前已安裝NutchEz" 39 MI_check_nez_3="系統尚未安裝 NutchEz" 40 40 41 41 ### [for check_sunJava()] ### 42 check_sunJava_1="check_sunJava"43 check_sunJava_2="NutchEz 需要 Sun Java JDK 1.6 以上的版本"44 check_sunJava_if_1="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"45 check_sunJava_if_2="請輸入您的選擇: "46 check_sunJava_if_3="(1)系統沒有 Sun Java (2)Sun Java已安裝並於其他路徑 (3)結束"47 check_sunJava_if_4="請選擇 (1/2/3): "48 check_sunJava_if_5="請自行安裝 Sun Java 1.6 以上版本"49 check_sunJava_if_6="請輸入 Sum Java 的家路徑 (例如: '/usr/lib/jvm/java-6-sun-1.6.0.12'): "50 check_sunJava_if_7="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java"51 check_sunJava_if_8="Java 版本太舊 (請更新至 1.6 以上版本)"52 check_sunJava_if_9="系統有 Sun Java 1.6 以上版本"53 check_sunJava_if_10="請自行安裝 Sun Java 1.6 以上版本"42 MI_check_sunJava_1="check_sunJava" 43 MI_check_sunJava_2="NutchEz 需要 Sun Java JDK 1.6 以上的版本" 44 MI_check_sunJava_if_1="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java" 45 MI_check_sunJava_if_2="請輸入您的選擇: " 46 MI_check_sunJava_if_3="(1)系統沒有 Sun Java (2)Sun Java已安裝並於其他路徑 (3)結束" 47 MI_check_sunJava_if_4="請選擇 (1/2/3): " 48 MI_check_sunJava_if_5="請自行安裝 Sun Java 1.6 以上版本" 49 MI_check_sunJava_if_6="請輸入 Sum Java 的家路徑 (例如: '/usr/lib/jvm/java-6-sun-1.6.0.12'): " 50 MI_check_sunJava_if_7="Java 並不是 Sun 版本, 請自行安裝 Sun 版本的 Java" 51 MI_check_sunJava_if_8="Java 版本太舊 (請更新至 1.6 以上版本)" 52 MI_check_sunJava_if_9="系統有 Sun Java 1.6 以上版本" 53 MI_check_sunJava_if_10="請自行安裝 Sun Java 1.6 以上版本" 54 54 55 55 ### [for check_ssh()] ### 56 check_ssh_1="check_ssh"57 check_ssh_2="系統已有 ssh."58 check_ssh_3="請安裝 ssh."59 check_ssh_4="系統已有 ssh Server (sshd)."60 check_ssh_5="請安裝 ssh Server (sshd)."56 MI_check_ssh_1="check_ssh" 57 MI_check_ssh_2="系統已有 ssh." 58 MI_check_ssh_3="請安裝 ssh." 59 MI_check_ssh_4="系統已有 ssh Server (sshd)." 60 MI_check_ssh_5="請安裝 ssh Server (sshd)." 61 61 62 62 ### [for check_dialog()] ### 63 check_dialog_1="check_dialog"64 check_dialog_2="系統已有 dialog."65 check_dialog_3="請安裝 dialog."63 MI_check_dialog_1="check_dialog" 64 MI_check_dialog_2="系統已有 dialog." 65 MI_check_dialog_3="請安裝 dialog." 66 66 67 67 # 68 set_nutchuser_passwd_echo_1="請輸入欲設定的nutchuser密碼:"69 set_nutchuser_passwd_echo_2="請再輸入一次確認密碼:"70 71 # 72 select_eth_echo_1="系統偵測到目前擁有網卡如下:"73 select_eth_echo_2="請選擇欲給nutchez使用的網卡(1/2/3):"74 select_eth_echo_3="您選擇的網卡為:$net_choice"75 select_eth_echo_4="Master網路IP位址為:$net_address"76 select_eth_echo_5="Master的MAC為:$net_MacAddr"77 78 # 79 make_ssh_key_echo_1="正在產生SSH Key... "80 make_ssh_key_echo_2="SSH Key已產生"81 82 # 83 set_haoop_site_echo_1="正在設定hadoop-site.xml... "84 set_haoop_site_echo_2="hadoop-site.xml設定完成"85 86 # 87 set_nutch_site_echo_1="正在設定nutch-site.xml..."88 set_nutch_site_echo_2="http.agent.url 設定行號為:$Line_NO..."89 set_nutch_site_echo_3="編輯http.agent.url, 刪除行號 $Line_NO."90 set_nutch_site_echo_4="編輯http.agent.url完成"91 set_nutch_site_echo_5="http.agent.email 設定行號為:$Line_NO."92 set_nutch_site_echo_6="編輯http.agent.email, 刪除行號 $Line_NO."93 set_nutch_site_echo_7="編輯http.agent.email完成"94 set_nutch_site_echo_8="hadoop-site.xml設定完成"95 96 # 97 format_HDFS_echo_1="格式化HDFS..."98 format_HDFS_echo_2="格式化HDFS完成"99 100 # 101 start_up_NutchEZ_echo_1="啟動NutchEZ..."102 103 # 104 set_hosts_echo_1="設定master上的hosts"105 106 # 107 install_Nutch_echo_1="Master的IP位址為:"108 install_Nutch_echo_2="Master的Hostname為:"109 110 # 111 client_PassMasterIPAddr_echo_1="在client安裝檔修改MasterIP的行號: $Line_NO"112 client_PassMasterIPAddr_echo_2="編輯MasterIP..."113 client_PassMasterIPAddr_echo_3="完成編輯MasterIP."114 115 # 116 client_PassMaster_Hostname_echo_1="在client安裝檔修改Hostname, 行號為: $Line_NO"117 client_PassMaster_Hostname_echo_2="編輯Hostname..."118 client_PassMaster_Hostname_echo_3="完成編輯Hostname."119 120 # 121 make_client_install_echo_1="於function make_client_install ..."122 123 # 124 start_up_tomcat_echo_1="啟動tomcat..."125 start_up_tomcat_echo_2="等待 $i秒..."126 start_up_tomcat_echo_3="tomcat 已經啟動!"127 128 # 129 client_install_commands_echo_1="Client安裝可參考以下指令:"130 client_install_commands_echo_2="cd ~"131 client_install_commands_echo_3="mkdir nutchez_client_install"132 client_install_commands_echo_4="cd nutchez_client_install"133 client_install_commands_echo_5="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ."134 client_install_commands_echo_6="sudo su"135 client_install_commands_echo_7="./client_install"68 MI_set_nutchuser_passwd_echo_1="請輸入欲設定的nutchuser密碼:" 69 MI_set_nutchuser_passwd_echo_2="請再輸入一次確認密碼:" 70 71 # 72 MI_select_eth_echo_1="系統偵測到目前擁有網卡如下:" 73 MI_select_eth_echo_2="請選擇欲給nutchez使用的網卡(1/2/3):" 74 MI_select_eth_echo_3="您選擇的網卡為:$net_choice" 75 MI_select_eth_echo_4="Master網路IP位址為:$net_address" 76 MI_select_eth_echo_5="Master的MAC為:$net_MacAddr" 77 78 # 79 MI_make_ssh_key_echo_1="正在產生SSH Key... " 80 MI_make_ssh_key_echo_2="SSH Key已產生" 81 82 # 83 MI_set_haoop_site_echo_1="正在設定hadoop-site.xml... " 84 MI_set_haoop_site_echo_2="hadoop-site.xml設定完成" 85 86 # 87 MI_set_nutch_site_echo_1="正在設定nutch-site.xml..." 88 MI_set_nutch_site_echo_2="http.agent.url 設定行號為:$Line_NO..." 89 MI_set_nutch_site_echo_3="編輯http.agent.url, 刪除行號 $Line_NO." 90 MI_set_nutch_site_echo_4="編輯http.agent.url完成" 91 MI_set_nutch_site_echo_5="http.agent.email 設定行號為:$Line_NO." 92 MI_set_nutch_site_echo_6="編輯http.agent.email, 刪除行號 $Line_NO." 93 MI_set_nutch_site_echo_7="編輯http.agent.email完成" 94 MI_set_nutch_site_echo_8="hadoop-site.xml設定完成" 95 96 # 97 MI_format_HDFS_echo_1="格式化HDFS..." 98 MI_format_HDFS_echo_2="格式化HDFS完成" 99 100 # 101 MI_start_up_NutchEZ_echo_1="啟動NutchEZ..." 102 103 # 104 MI_set_hosts_echo_1="設定master上的hosts" 105 106 # 107 MI_install_Nutch_echo_1="Master的IP位址為:" 108 MI_install_Nutch_echo_2="Master的Hostname為:" 109 110 # 111 MI_client_PassMasterIPAddr_echo_1="在client安裝檔修改MasterIP的行號: $Line_NO" 112 MI_client_PassMasterIPAddr_echo_2="編輯MasterIP..." 113 MI_client_PassMasterIPAddr_echo_3="完成編輯MasterIP." 114 115 # 116 MI_client_PassMaster_Hostname_echo_1="在client安裝檔修改Hostname, 行號為: $Line_NO" 117 MI_client_PassMaster_Hostname_echo_2="編輯Hostname..." 118 MI_client_PassMaster_Hostname_echo_3="完成編輯Hostname." 119 120 # 121 MI_make_client_install_echo_1="於function make_client_install ..." 122 123 # 124 MI_start_up_tomcat_echo_1="啟動tomcat..." 125 MI_start_up_tomcat_echo_2="等待約10秒..." 126 MI_start_up_tomcat_echo_3="tomcat 已經啟動!" 127 128 # 129 MI_client_install_commands_echo_1="Client安裝可參考以下指令:" 130 MI_client_install_commands_echo_2="cd ~" 131 MI_client_install_commands_echo_3="mkdir nutchez_client_install" 132 MI_client_install_commands_echo_4="cd nutchez_client_install" 133 MI_client_install_commands_echo_5="scp nutchuser@$MasterIP_Address:/home/nutchuser/nutchez/source/* ." 134 MI_client_install_commands_echo_6="sudo su" 135 MI_client_install_commands_echo_7="./client_install" 136 136 137 137 ########## Lang for Master Install - End########## … … 235 235 236 236 # check root 237 check_root_1="請切換成 root 身份執行移除程式!!!"238 check_root_2="已確認為root身份, 將繼續執行此移除程式!"237 MR_check_root_1="請切換成 root 身份執行移除程式!!!" 238 MR_check_root_2="已確認為root身份, 將繼續執行此移除程式!" 239 239 240 240 # shutdown service 241 shutdown_service_echo_1="停止其他尚未關閉的slaves服務..."242 shutdown_service_echo_2="關閉本機服務..."243 shutdown_service_echo_3="本機服務已關閉"241 MR_shutdown_service_echo_1="停止其他尚未關閉的slaves服務..." 242 MR_shutdown_service_echo_2="關閉本機服務..." 243 MR_shutdown_service_echo_3="本機服務已關閉" 244 244 245 245 # remove_folders 246 remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."247 remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"246 MR_remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..." 247 MR_remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除" 248 248 249 249 # edit_hosts 250 edit_hosts_echo_1="修改/etc/hosts..."251 edit_hosts_echo_2="完成修改/etc/hosts"250 MR_edit_hosts_echo_1="還原/etc/hosts...至安裝NutchEZ前的版本" 251 MR_edit_hosts_echo_2="完成修改/etc/hosts" 252 252 253 253 # user_delete 254 user_delete_echo_1="正在刪除nutchuser使用者..."255 user_delete_echo_2="使用者nutchuser已刪除"254 MR_user_delete_echo_1="正在刪除nutchuser使用者..." 255 MR_user_delete_echo_2="使用者nutchuser已刪除" 256 256 257 257 # main 258 main_echo_1="警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"259 main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"260 main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"261 main_echo_4="移除程序已完成!"262 main_echo_5="您已取消移除程序!"263 main_echo_6="若要移除請再重新執行!"258 MR_main_echo_1="警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!" 259 MR_main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。" 260 MR_main_echo_3="請問是否確定移除此一節點:1.確定 2.取消" 261 MR_main_echo_4="移除程序已完成!" 262 MR_main_echo_5="您已取消移除程序!" 263 MR_main_echo_6="若要移除請再重新執行!" 264 264 265 265 ########## Lang for Master Remove - End ########## … … 267 267 ########## Lang for Client Remove - Start ########## 268 268 # check root 269 check_root_1="請切換成 root 身份執行移除程式!!!"270 check_root_2="已確認為root身份, 將繼續執行此移除程式!"269 CR_check_root_1="請切換成 root 身份執行移除程式!!!" 270 CR_check_root_2="已確認為root身份, 將繼續執行此移除程式!" 271 271 272 272 # shutdown service 273 shutdown_service_echo_1="關閉本機服務..."274 shutdown_service_echo_2="本機服務已關閉"273 CR_shutdown_service_echo_1="關閉本機服務..." 274 CR_shutdown_service_echo_2="本機服務已關閉" 275 275 276 276 # remove_folders 277 remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..."278 remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除"277 CR_remove_folders_echo_1="正在刪除安裝時所建立的檔案及資料夾..." 278 CR_remove_folders_echo_2="安裝時所建立的檔案及資料夾已刪除" 279 279 280 280 # edit_hosts 281 edit_hosts_echo_1="修改/etc/hosts..."282 edit_hosts_echo_2="完成修改/etc/hosts"281 CR_edit_hosts_echo_1="還原/etc/hosts...至安裝NutchEZ前的版本" 282 CR_edit_hosts_echo_2="完成修改/etc/hosts" 283 283 284 284 # user_delete 285 user_delete_echo_1="正在刪除nutchuser使用者..."286 user_delete_echo_2="使用者nutchuser已刪除"285 CR_user_delete_echo_1="正在刪除nutchuser使用者..." 286 CR_user_delete_echo_2="使用者nutchuser已刪除" 287 287 288 288 # main 289 main_echo_1="警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"290 main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。"291 main_echo_3="請問是否確定移除此一節點:1.確定 2.取消"292 main_echo_4="移除程序已完成!"293 main_echo_5="您已取消移除程序!"294 main_echo_6="若要移除請再重新執行!"289 CR_main_echo_1="警告 - 此一程式為移除此用戶端的nutch node, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!" 290 CR_main_echo_2="本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號。" 291 CR_main_echo_3="請問是否確定移除此一節點:1.確定 2.取消" 292 CR_main_echo_4="移除程序已完成!" 293 CR_main_echo_5="您已取消移除程序!" 294 CR_main_echo_6="若要移除請再重新執行!" 295 295 ########## Lang for Client Remove - End ########## 296 296 -
nutchez-0.2/src/test/language_choise.sh
r116 r213 13 13 ;; 14 14 zh) 15 ln -sf ./install_lang.zh ./install_lang 15 # ln -sf ./install_lang.zh ./install_lang 16 ln -sf lang/lang_zh_TW lang_link 16 17 echo "你選擇了中文" 17 18 break; -
nutchez-0.2/src/test/master_remove.sh
r206 r213 33 33 debug_info "check_root" 34 34 if [ $USER != "root" ]; then 35 show_info "$ check_root_1" # "請切換成 root 身份執行移除程式!!!"35 show_info "$MR_check_root_1" # "請切換成 root 身份執行移除程式!!!" 36 36 exit 37 37 fi 38 show_info "$ check_root_2" # "已確認為root身份, 將繼續執行此移除程式!"38 show_info "$MR_check_root_2" # "已確認為root身份, 將繼續執行此移除程式!" 39 39 } 40 40 41 41 # shutdown service 42 42 function shutdown_service () { 43 show_info "$ shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..."43 show_info "$MR_shutdown_service_echo_1" # "停止其他尚未關閉的slaves服務..." 44 44 slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1` 45 45 for nutch_node in $slaves_list … … 48 48 su nutchuser -c "ssh nutchuser@$nutch_node /opt/nutchez/nutch/bin/hadoop-daemon.sh stop tasktracker" 49 49 done 50 show_info "$ shutdown_service_echo_2" # "關閉本機服務..."50 show_info "$MR_shutdown_service_echo_2" # "關閉本機服務..." 51 51 su nutchuser -c "/opt/nutchez/nutch/bin/stop-all.sh" 52 52 su nutchuser -c "/opt/nutchez/tomcat/bin/shutdown.sh" 53 show_info "$ shutdown_service_echo_3" # "本機服務已關閉"53 show_info "$MR_shutdown_service_echo_3" # "本機服務已關閉" 54 54 } 55 55 56 56 # 移除檔案及資料夾 57 57 function remove_folders () { 58 show_info "$ remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..."58 show_info "$MR_remove_folders_echo_1" # "正在刪除安裝時所建立的檔案及資料夾..." 59 59 rm -rf /opt/nutchez 60 60 rm -rf /var/nutchez 61 show_info "$ remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除"61 show_info "$MR_remove_folders_echo_2" # "安裝時所建立的檔案及資料夾已刪除" 62 62 } 63 63 … … 65 65 # 還原/etc/hosts 66 66 function edit_hosts () { 67 show_info "$edit_hosts_echo_1" # "修改/etc/hosts..." 68 slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1` 69 for nutch_node in $slaves_list 70 do 71 Line_NO=`cat /etc/hosts | grep -n $nutch_node | sed 's/:.*//g'` 72 if [[ $Line_NO -ge 1 ]]; then 73 sed -i ''$Line_NO'd' /etc/hosts 74 fi 75 done 76 show_info "$edit_hosts_echo_2" # "完成修改/etc/hosts" 67 show_info "$MR_edit_hosts_echo_1" # "修改/etc/hosts..." 68 # slaves_list=`cat $nutch_PATH'/nutch_nodes' | cut -d' ' -f1` 69 # for nutch_node in $slaves_list 70 # do 71 # Line_NO=`cat /etc/hosts | grep -n $nutch_node | sed 's/:.*//g'` 72 # if [[ $Line_NO -ge 1 ]]; then 73 # sed -i ''$Line_NO'd' /etc/hosts 74 # fi 75 # done 76 cat > /etc/hosts < /home/nutchuser/nutchez/system/hosts.bak 77 show_info "$MR_edit_hosts_echo_2" # "完成修改/etc/hosts" 77 78 } 78 79 79 80 # 移除使用者 80 81 function user_delete () { 81 show_info "$ user_delete_echo_1" # "正在刪除nutchuser使用者..."82 show_info "$MR_user_delete_echo_1" # "正在刪除nutchuser使用者..." 82 83 userdel -r nutchuser 83 show_info "$ user_delete_echo_2" # "使用者nutchuser已刪除"84 show_info "$MR_user_delete_echo_2" # "使用者nutchuser已刪除" 84 85 } 85 86 86 87 # Main function 87 88 function main () { 88 show_info "$ main_echo_1" #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!"89 show_info "$ main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號"89 show_info "$MR_main_echo_1" #"警告 - 此一程式為移除nutchEZ程式, 若您為誤執行此一程式, 請按Ctrl+c離開此程序!" 90 show_info "$MR_main_echo_2" #"本執行程序將會移除安裝nutchEZ時所新增的檔案及nutchuser使用者帳號" 90 91 # 詢問是否繼續 91 read -p "$ main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消"92 read -p "$MR_main_echo_3" confirm # "請問是否確定移除此一節點:1.確定 2.取消" 92 93 # 確認移除 93 94 if [ $confirm -eq 1 ]; then … … 97 98 edit_hosts 98 99 user_delete 99 show_info "$ main_echo_4" # "移除程序已完成!"100 show_info "$MR_main_echo_4" # "移除程序已完成!" 100 101 elif [ $confirm -eq 2 ]; then 101 show_info "$ main_echo_5" # "您已取消移除程序!"102 show_info "$ main_echo_6" # "若要移除請再重新執行!"102 show_info "$MR_main_echo_5" # "您已取消移除程序!" 103 show_info "$MR_main_echo_6" # "若要移除請再重新執行!" 103 104 fi 104 105 }
Note: See TracChangeset
for help on using the changeset viewer.