php-ver fixed to skip nginx question
Skip nginx question when not installed and php-ver running
This commit is contained in:
parent
2b81c7c4be
commit
63e7c70486
|
@ -347,7 +347,7 @@ elif [[ $opt == "-html" || $opt == "-nginx" ]]; then
|
||||||
|
|
||||||
elif [[ $opt == "-php" ]]; then
|
elif [[ $opt == "-php" ]]; then
|
||||||
if [[ $(conf_read php) != "true" ]]; then
|
if [[ $(conf_read php) != "true" ]]; then
|
||||||
if [[ $(conf_read nginx) != "true" ]]; then
|
if [[ $(conf_read nginx) != "true" && $(conf_read delall) != "true" ]]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "${blu}Nginx is not installed, do you want to install it too [Y/n]?${end} "
|
echo "${blu}Nginx is not installed, do you want to install it too [Y/n]?${end} "
|
||||||
while read -r -n 1 -s answer; do
|
while read -r -n 1 -s answer; do
|
||||||
|
@ -438,16 +438,20 @@ elif [[ $opt == "-php-ver="* ]]; then
|
||||||
elif [[ $(conf_read php) == "true" && $(conf_read mysql-tool) == "true" ]]; then
|
elif [[ $(conf_read php) == "true" && $(conf_read mysql-tool) == "true" ]]; then
|
||||||
sudo stack -php -purge=force
|
sudo stack -php -purge=force
|
||||||
conf_write php-ver $phpver
|
conf_write php-ver $phpver
|
||||||
|
# force flag prevent to be questioned (Unattended) when nginx is not installed.
|
||||||
|
conf_write delall true
|
||||||
sudo stack -php
|
sudo stack -php
|
||||||
sudo stack -pma
|
sudo stack -pma
|
||||||
elif [[ $(conf_read php) == "true" && $(conf_read mysql-tool) != "true" ]]; then
|
elif [[ $(conf_read php) == "true" && $(conf_read mysql-tool) != "true" ]]; then
|
||||||
sudo stack -php -purge=force
|
sudo stack -php -purge=force
|
||||||
conf_write php-ver $phpver
|
conf_write php-ver $phpver
|
||||||
|
conf_write delall true
|
||||||
sudo stack -php
|
sudo stack -php
|
||||||
elif [[ $(conf_read php) != "true" && $(conf_read mysql-tool) != "true" ]]; then
|
elif [[ $(conf_read php) != "true" && $(conf_read mysql-tool) != "true" ]]; then
|
||||||
conf_write php-ver $phpver
|
conf_write php-ver $phpver
|
||||||
echo "${gre} PHP is not already installed but new version will be installed next time! ${end}"
|
echo "${gre} PHP is not already installed but new version will be installed next time! ${end}"
|
||||||
fi
|
fi
|
||||||
|
clear_force_flag
|
||||||
else
|
else
|
||||||
echo "${red} Please, enter a valid PHP version!${end}"
|
echo "${red} Please, enter a valid PHP version!${end}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue