Pārlūkot izejas kodu

set a check to make sure your using debian jessie or wheezy or exit script

Richard Neese 10 gadi atpakaļ
vecāks
revīzija
644d99e654

+ 12 - 22
install/Debian/FusionPbx-Debian-Optional-Pkgs-or-Source-Install.sh

@@ -89,30 +89,20 @@ fi
 #################
 lsb_release -c |grep -i wheezy &> /dev/null 2>&1
 if [ $? -eq 0 ]; then
-		echo "Good, you are running Debian 7 codename: wheezy"
-		echo
+	echo "Good, you are running Debian 7 codename: wheezy"
+	echo
 else
-		lsb_release -c |grep -i jessie > /dev/null
-		if [ $? -eq 0 ]; then
-                /bin/echo "OK you are running Debian 8 CodeName: Jessie. This script is known to work"
+	lsb_release -c |grep -i jessie > /dev/null
+	if [ $? -eq 0 ]; then
+		/bin/echo "OK you are running Debian 8 CodeName: Jessie. This script is known to work"
+	else
+		echo "This script was written for Debian 7 codename wheezy & Debian 8 codename Jessie"
 		echo
-				CONTINUE=YES
-		else
-				echo "This script was written for Debian 7 codename wheezy"
-				echo "Your OS appears to be:" lsb_release -a
-				read -p "Do you wish to continue y/n? " CONTINUE
-				case "$CONTINUE" in
-					[yY]*)
-					echo "Ok, this does not always work..,"
-					echo "  but well give it a go."
-					;;
-
-                *)
-					echo "Exiting the install."
-                    exit
-                ;;
-                esac
-		fi
+		echo "Your OS appears to be:" lsb_release -a
+		echo
+		echo "Your OS is not supported... Exiting the install."
+		exit
+	fi
 fi
 
 ###################