Ver Fonte

Error on ambigous domain names in getPHPHandler.sh

root há 2 anos atrás
pai
commit
d937c70aa7
1 ficheiros alterados com 5 adições e 0 exclusões
  1. 5 0
      pleskDomain/getPHPHandler.sh

+ 5 - 0
pleskDomain/getPHPHandler.sh

@@ -18,6 +18,11 @@ if [ $? -ne 0 ]; then
 	exit 2;
 fi
 
+if [ $(echo "$dboutput" | grep -c "$1") -ne 1 ];then
+	echo "Your given domain name '$1' is ambigous. Please be more specific."
+	exit 1;
+fi
+
 php_handler_id=$(echo "$row" | awk -F'|' '{print $3}')
 
 phpVersion=$(echo $php_handler_id | grep -o '[0-9]\+')