mirror of
https://github.com/EngineGPDev/Autoinstall.git
synced 2025-01-18 22:02:22 +03:00
Changing the php version to the required one, postponed after installing phpMyAdmin
phpMyAdmin installs the latest version from the repository
This commit is contained in:
parent
7ad5282136
commit
670016a6c5
16
install.sh
16
install.sh
@ -371,14 +371,6 @@ EOF
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Установка версии php по умолчанию
|
|
||||||
if [[ "$(php -v | grep -oP '(?<=PHP )(\d+\.\d+)')" != "$verPHP" ]]; then
|
|
||||||
sudo update-alternatives --set php /usr/bin/php$verPHP >> $logsINST 2>&1
|
|
||||||
sudo update-alternatives --set php-config /usr/bin/php-config$verPHP >> $logsINST 2>&1
|
|
||||||
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$verPHP >> $logsINST 2>&1
|
|
||||||
sudo update-alternatives --set phpize /usr/bin/phpize$verPHP >> $logsINST 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Установка phpMyAdmin
|
# Установка phpMyAdmin
|
||||||
if ! dpkg-query -W -f='${Status}' "phpmyadmin" 2>/dev/null | grep -q "install ok installed"; then
|
if ! dpkg-query -W -f='${Status}' "phpmyadmin" 2>/dev/null | grep -q "install ok installed"; then
|
||||||
echo "===================================" >> $logsINST 2>&1
|
echo "===================================" >> $logsINST 2>&1
|
||||||
@ -407,6 +399,14 @@ EOF
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Установка версии php по умолчанию
|
||||||
|
if [[ "$(php -v | grep -oP '(?<=PHP )(\d+\.\d+)')" != "$verPHP" ]]; then
|
||||||
|
sudo update-alternatives --set php /usr/bin/php$verPHP >> $logsINST 2>&1
|
||||||
|
sudo update-alternatives --set php-config /usr/bin/php-config$verPHP >> $logsINST 2>&1
|
||||||
|
sudo update-alternatives --set phpdbg /usr/bin/phpdbg$verPHP >> $logsINST 2>&1
|
||||||
|
sudo update-alternatives --set phpize /usr/bin/phpize$verPHP >> $logsINST 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
# Проверяем установку php-fpm по умолчанию
|
# Проверяем установку php-fpm по умолчанию
|
||||||
if dpkg-query -W -f='${Status}' "php$defPHP-fpm" 2>/dev/null | grep -q "install ok installed"; then
|
if dpkg-query -W -f='${Status}' "php$defPHP-fpm" 2>/dev/null | grep -q "install ok installed"; then
|
||||||
if ! systemctl is-active --quiet php$defPHP-fpm; then
|
if ! systemctl is-active --quiet php$defPHP-fpm; then
|
||||||
|
Loading…
Reference in New Issue
Block a user