From 184a26e30ffcd6b3f366f95a6b509061bc0d95b4 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 3 Oct 2016 10:02:19 +0300 Subject: [PATCH] Disable default debug mode in the installer and check for X session presence. https://github.com/deltaxflux/fluxion/issues/164 --- Installer.sh | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Installer.sh b/Installer.sh index 7fa5bdb..fabfba2 100755 --- a/Installer.sh +++ b/Installer.sh @@ -1,9 +1,16 @@ #!/bin/bash -INSTALLER_DEBUG=1 +########## DEBUG Mode ########## +## ## +if [ -z ${INSTALLER_DEBUG+x} ]; then INSTALLER_DEBUG=0 +else INSTALLER_DEBUG=1 +fi +## ## +################################ + #Config version=2 -revision=5 +revision=6 #Colors red='\e[1;31m' blue='\e[1;34m' @@ -39,6 +46,14 @@ fi clear +#Check for X display + +if [ -z "${DISPLAY:-}" ]; then + echo -e "\e[1;31mThe script should be executed inside a X (graphical) session."$transparent"" + exit 1 +fi + + function mostrarheader(){ @@ -274,7 +289,7 @@ else fi sleep 0.025 ############################## -echo -ne "Php5-cgi........" +echo -ne "Php-cgi........" if ! hash php-cgi 2>/dev/null; then echo -e "\e[1;31mInstalling ..."$transparent"" xterm $HOLD -title "Installing Php5-cgi" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install php-cgi