12977 adding a force to php8 on lts installations to online installers

This commit is contained in:
rafael 2024-03-04 16:13:36 +01:00
parent 4acb8f1efd
commit 54f2e4e89e
2 changed files with 14 additions and 7 deletions

View File

@ -20,7 +20,7 @@ LOGFILE="/tmp/pandora-deploy-community-$(date +%F).log"
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$MYVER" ] || MYVER=80
[ "$PHPVER" ] || PHPVER=8
[ "$PHPVER" ] || PHPVER=8.2
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
@ -49,6 +49,9 @@ cyan="\e[0;36m"
yellow="\e[33m"
reset="\e[0m"
#force lts to install php 8.0
[ "$PANDORA_LTS" -eq '1' ] && PHPVER=8.0
# Functions
execute_cmd () {
local cmd="$1"
@ -289,13 +292,13 @@ execute_cmd "dnf install -y wget" "Installing wget"
#Installing php
execute_cmd "dnf module reset -y php " "Disabling standard PHP module"
if [ "$PHPVER" -ne '8' ] ; then
execute_cmd "dnf module install -y php:remi-7.4" "Configuring PHP 7"
if [ "$PHPVER" == '8' ] ; then
PHPVER=8.0
fi
if [ "$PHPVER" -eq '8' ] ; then
execute_cmd "dnf module install -y php:remi-8.0" "Configuring PHP 8"
fi
execute_cmd "dnf module install -y php:remi-${PHPVER}" "Configuring PHP ${PHPVER}"
# Install percona Database
execute_cmd "dnf module disable -y mysql" "Disabiling mysql module"

View File

@ -23,7 +23,7 @@ rm -f $LOGFILE &> /dev/null # remove last log before start
# define default variables
[ "$TZ" ] || TZ="Europe/Madrid"
[ "$PHPVER" ] || PHPVER=8.0
[ "$PHPVER" ] || PHPVER=8.2
[ "$DBHOST" ] || DBHOST=127.0.0.1
[ "$DBNAME" ] || DBNAME=pandora
[ "$DBUSER" ] || DBUSER=pandora
@ -50,6 +50,10 @@ green="\e[0;92m"
cyan="\e[0;36m"
reset="\e[0m"
#force lts to install php 8.0
[ "$PANDORA_LTS" -eq '1' ] && PHPVER=8.0
# Functions
execute_cmd () {