Merge branch 'ent-12977-cambio-instalador-online-para-forzar-lts-a-php8-y-por-defecto-para-no-lts-8-2' into 'develop'

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

See merge request artica/pandorafms!6988
This commit is contained in:
Rafael Ameijeiras 2024-03-05 10:56:40 +00:00
commit eb56127203
2 changed files with 17 additions and 10 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"
@ -813,7 +816,7 @@ chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"

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 () {
@ -526,7 +530,7 @@ if [ "$PANDORA_LTS" -eq '1' ] ; then
elif [ "$PANDORA_LTS" -ne '1' ] ; then
[ "$PANDORA_SERVER_PACKAGE" ] || PANDORA_SERVER_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_server-7.0NG.tar.gz"
[ "$PANDORA_CONSOLE_PACKAGE" ] || PANDORA_CONSOLE_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_console-7.0NG.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE=" https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
[ "$PANDORA_AGENT_PACKAGE" ] || PANDORA_AGENT_PACKAGE="https://firefly.pandorafms.com/pandorafms/latest/Tarball/pandorafms_agent_linux-7.0NG.x86_64.tar.gz"
fi
if [ "$PANDORA_BETA" -eq '1' ] ; then
@ -810,7 +814,7 @@ chmod 0644 /etc/logrotate.d/pandora_agent
# Add websocket engine start script.
mv /var/www/html/pandora_console/pandora_websocket_engine /etc/init.d/ &>> "$LOGFILE"
chmod +x /etc/init.d/pandora_websocket_engine
chmod +x /etc/init.d/pandora_websocket_engine &>> "$LOGFILE"
# Start Websocket engine
/etc/init.d/pandora_websocket_engine start &>> "$LOGFILE"