Changeset 177
- Timestamp:
- Jun 10, 2010, 3:14:50 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/nutchez
r176 r177 64 64 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \ 65 65 --title "[Management Options]" \ 66 --menu "Plz choose: " 15 556 \66 --menu "Plz choose: " 15 60 6 \ 67 67 "cluster_status" "Check cluster status" \ 68 68 "cluster_setup" "Setup your datanode & tasktracker" \ … … 122 122 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC =" \ 123 123 --title "[Management Options]" \ 124 --menu "Plz choose: " 15 55 2\124 --menu "Plz choose: " 15 55 3 \ 125 125 "All" "All nodes" \ 126 "Part" "choose part nodess" 2>$allpart 126 "Part" "Choose part nodess" \ 127 "Exit" "Exit" 2>$allpart 127 128 128 129 # 判斷是否選 all 和 part,若是 all 直接到服務選單,若是 part 則先到機器選單 129 if [ $(cat $allpart)== "All" ]; then130 if [ "$(cat $allpart)" == "All" ]; then 130 131 cat $NutchEZ_HOME/system/nutch_nodes | grep -v '^$' | grep -v '#' | awk '{print $1}' >$runNodes 131 el se132 elif [ "$(cat $allpart)" == "Part" ]; then 132 133 $DIALOG --clear --backtitle "= [NutchEz Management Interface] ~by NCHC = " --title "[Datanode & Tasktracker Nodes Choose]" \ 133 --checklist "datanode & tasktracker choose: " 15 55 7 $(cat 134 --checklist "datanode & tasktracker choose: " 15 55 7 $(cat $NutchEZ_HOME/system/nutch_nodes | \ 134 135 grep -v '^$' | grep -v '#' | awk '{print $1 "\t" $2 "\t" "$LIST_status" }') 2>$runNodes 136 else 137 exit 138 fi 139 140 if [ -z "$(cat $runNodes)" ]; then 141 exit 135 142 fi 136 143 … … 160 167 [ $? == "0" ] || echo "Can't ssh to $node !!!" 161 168 done 162 el se169 elif [ "$(cat $clusterSetup)" == "restart" ]; then 163 170 echo -e "\n[Restart datanode & tasktracker]" 164 171 for node in $(cat $runNodes) … … 166 173 echo -e "restart $node datanode & tasktracker !" 167 174 ssh -o StrictHostKeyChecking=no $node "$NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh stop datanode \ 168 ; $NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh stop tasktracker "169 ssh -o StrictHostKeyChecking=no $node "$NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh start datanode \175 ; $NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh stop tasktracker \ 176 ; $NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh start datanode \ 170 177 ; $NutchEZ_Install_PATH/nutch/bin/hadoop-daemon.sh start tasktracker" 171 178 [ $? == "0" ] || echo "Can't ssh to $node !!!" 172 179 done 173 180 else 181 exit 174 182 fi 175 183 } … … 194 202 "restart" "Restart tomcat" \ 195 203 "exit" "Exit" 2>$tomcatSwitch 204 205 if [ "$(cat $tomcatSwitch)" == "exit" ]; then 206 exit 0 207 fi 208 209 # jude $Tomcat_HOME/bin/startup.sh 210 if [ ! -e $Tomcat_HOME/bin/startup.sh ]; then 211 echo -e "\nDon't fine $Tomcat_HOME/bin/startup.sh" 212 exit 213 fi 214 215 if [ ! -e $Tomcat_HOME/bin/shudown.sh ]; then 216 echo -e "\nDon't fine $Tomcat_HOME/bin/shudown.sh" 217 exit 218 fi 196 219 197 220 if [ "$(cat $tomcatSwitch)" == "start" ]; then … … 222 245 --inputbox "Plz input port number for tomcat (default is 8080)" 10 55 2>$tomcatPort 223 246 224 if [ -z $(cat $tomcatPort)]; then247 if [ -z "$(cat $tomcatPort)" ]; then 225 248 exit 226 249 else … … 242 265 --menu "Plz choose: " 15 55 3 \ 243 266 "English" "English" \ 244 "Chinese" "Chinese" 2>$langSwitch 267 "Chinese" "Chinese" \ 268 "Exit" "Exit" 2>$langSwitch 245 269 # 246 echo "source $(cat $langSwitch)" 270 if [ "$(cat $langSwitch)" == "Exit" ]; then 271 exit 272 else 273 echo "source $(cat $langSwitch)" 274 fi 247 275 } 248 276
Note: See TracChangeset
for help on using the changeset viewer.