Disable default debug mode in the installer and check for X session presence. https://github.com/deltaxflux/fluxion/issues/164

This commit is contained in:
root 2016-10-03 10:02:19 +03:00
parent 30e071d323
commit 184a26e30f
1 changed files with 18 additions and 3 deletions

View File

@ -1,9 +1,16 @@
#!/bin/bash #!/bin/bash
INSTALLER_DEBUG=1 ########## DEBUG Mode ##########
## ##
if [ -z ${INSTALLER_DEBUG+x} ]; then INSTALLER_DEBUG=0
else INSTALLER_DEBUG=1
fi
## ##
################################
#Config #Config
version=2 version=2
revision=5 revision=6
#Colors #Colors
red='\e[1;31m' red='\e[1;31m'
blue='\e[1;34m' blue='\e[1;34m'
@ -39,6 +46,14 @@ fi
clear 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(){ function mostrarheader(){
@ -274,7 +289,7 @@ else
fi fi
sleep 0.025 sleep 0.025
############################## ##############################
echo -ne "Php5-cgi........" echo -ne "Php-cgi........"
if ! hash php-cgi 2>/dev/null; then if ! hash php-cgi 2>/dev/null; then
echo -e "\e[1;31mInstalling ..."$transparent"" echo -e "\e[1;31mInstalling ..."$transparent""
xterm $HOLD -title "Installing Php5-cgi" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install php-cgi xterm $HOLD -title "Installing Php5-cgi" $TOPLEFTBIG -bg "#FFFFFF" -fg "#000000" -e apt-get --yes install php-cgi