Changeset 123 for nutchez-0.2/src/test/client_install_func.sh
- Timestamp:
- May 21, 2010, 5:35:16 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
nutchez-0.2/src/test/client_install_func.sh
r122 r123 7 7 # 2010/05/20 Rock First release(0.1) 8 8 9 # 正式版之後,記的將不必要的 echo 拿掉 10 11 12 # 檢查執行這個程式的是否為root權限 9 13 function check_root(){ 14 # 正式版後可拿掉此 echo 10 15 echo -e "\n= check_root =" 11 16 if [ $USER != "root" ]; then … … 13 18 exit 14 19 fi 20 # 正式版後可拿掉此 echo 21 echo -e "Identify is root." 15 22 } 16 17 23 18 24 … … 42 48 javaPath="/usr/" 43 49 44 test -e $javaPath/bin/java || read -p "Plz input yourspecific Java path\50 test -e $javaPath/bin/java || read -p "Plz input specific Java path\ 45 51 (ex./opt/jvm/java-6-sun-1.6.0.20/): " javaPath 46 52 … … 51 57 52 58 if [ "$JAVA_org" == "" ]; then 53 echo " YourJava is not Sun version, plz install sun Java 1.6.X"59 echo "Java is not Sun version, plz install sun Java 1.6.X" 54 60 exit 55 61 fi 56 62 57 63 if [ $JAVA_version -lt "1.6" ]; then 58 echo " YourJava version is too old (it need 1.6.X above)"64 echo "Java version is too old (it need 1.6.X above)" 59 65 exit 60 66 fi … … 67 73 unset JAVA_org 68 74 unset JAVA_version 75 } 69 76 77 78 # 檢查是否有安裝openssh, openssh-server 79 function check_ssh(){ 80 echo -e "\n= check_ssh =" 81 if [ -e /usr/bin/ssh ]; then 82 echo -e "\nSystem has ssh." 83 else 84 echo "Plz install ssh." 85 exit 86 fi 87 88 if [ -e /usr/sbin/sshd ]; then 89 echo "System has ssh Server (sshd)." 90 else 91 echo "Plz install ssh Server (sshd)." 92 exit 93 fi 70 94 } 95 96 97 # 檢查是否有安裝dialog 98 function check_dialog(){ 99 echo -e "\n= check_dialog =" 100 if [ -e /usr/bin/dialog ]; then 101 echo -e "\nSystem has dialog." 102 else 103 echo "Plz install dialog." 104 exit 105 fi 106 } 107 108 109 # 檢查是否安裝 php 5.5 110 function check_php(){ 111 echo -e "\n= check_php =" 112 if [ "$(php -v 2>/dev/null | grep "PHP 5" | awk '{print $2}' | cut -d "." -f1)" == 5 ]; then 113 echo -e "\nPHP'version is 5" 114 else 115 echo -e "\nplz install PHP 5 version" 116 # exit 117 fi 118 }
Note: See TracChangeset
for help on using the changeset viewer.