mirror of
https://github.com/joglomedia/LEMPer.git
synced 2026-04-13 00:18:31 +00:00
Fix PHP install
This commit is contained in:
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
sed -i "s/FORCE_REMOVE=false/FORCE_REMOVE=true/g" .env
|
||||
sed -i "s/LEMPER_ADMIN_EMAIL=\"mail@example.com\"/LEMPER_ADMIN_EMAIL=\"me@masedi.net\"/g" .env
|
||||
sed -i "s/NGINX_INSTALLER=\"source\"/NGINX_INSTALLER=\"repo\"/g" .env
|
||||
sed -i "s/NGX_PAGESPEED=false/NGINX_INSTALLER=true/g" .env
|
||||
# sed -i "s/NGX_PAGESPEED=false/NGX_PAGESPEED=true/g" .env
|
||||
sed -i "s/INSTALL_PHP_LOADER=false/INSTALL_PHP_LOADER=true/g" .env
|
||||
sed -i "s/PHP_LOADER=\"none\"/PHP_LOADER=\"ioncube\"/g" .env
|
||||
sed -i "s/IMAGEMAGICK_INSTALLER=\"source\"/IMAGEMAGICK_INSTALLER=\"repo\"/g" .env
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
sed -i "s/FORCE_REMOVE=false/FORCE_REMOVE=true/g" .env
|
||||
sed -i "s/LEMPER_ADMIN_EMAIL=\"mail@example.com\"/LEMPER_ADMIN_EMAIL=\"me@masedi.net\"/g" .env
|
||||
sed -i "s/NGINX_INSTALLER=\"source\"/NGINX_INSTALLER=\"repo\"/g" .env
|
||||
sed -i "s/NGX_PAGESPEED=false/NGINX_INSTALLER=true/g" .env
|
||||
# sed -i "s/NGX_PAGESPEED=false/NGX_PAGESPEED=true/g" .env
|
||||
sed -i "s/INSTALL_PHP_LOADER=false/INSTALL_PHP_LOADER=true/g" .env
|
||||
sed -i "s/PHP_LOADER=\"none\"/PHP_LOADER=\"ioncube\"/g" .env
|
||||
sed -i "s/IMAGEMAGICK_INSTALLER=\"source\"/IMAGEMAGICK_INSTALLER=\"repo\"/g" .env
|
||||
|
||||
@@ -1092,17 +1092,6 @@ function init_php_install() {
|
||||
install_php "${DEFAULT_PHP_VERSION}"
|
||||
install_php_loader "${DEFAULT_PHP_VERSION}" "${OPT_PHP_LOADER}"
|
||||
restart_php_fpm "${DEFAULT_PHP_VERSION}"
|
||||
|
||||
# Set default PHP.
|
||||
if [[ -n $(command -v "php${DEFAULT_PHP_VERSION}") ]]; then
|
||||
echo "Set default PHP command line to version ${DEFAULT_PHP_VERSION}..."
|
||||
|
||||
run update-alternatives --set php "$(command -v "php${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phar "$(command -v "phar${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phar.phar "$(command -v "phar.phar${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set php-config "$(command -v "php-config${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phpize "$(command -v "phpize${DEFAULT_PHP_VERSION}")"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install PHP composer.
|
||||
@@ -1114,3 +1103,14 @@ echo "[PHP & Extensions Installation]"
|
||||
# Start running things from a call at the end so if this script is executed
|
||||
# after a partial download it doesn't do anything.
|
||||
init_php_install "$@"
|
||||
|
||||
# Set default PHP.
|
||||
if [[ -n $(command -v "php${DEFAULT_PHP_VERSION}") ]]; then
|
||||
echo "Set default PHP command line to version ${DEFAULT_PHP_VERSION}..."
|
||||
|
||||
run update-alternatives --set php "$(command -v "php${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phar "$(command -v "phar${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phar.phar "$(command -v "phar.phar${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set php-config "$(command -v "php-config${DEFAULT_PHP_VERSION}")"
|
||||
run update-alternatives --set phpize "$(command -v "phpize${DEFAULT_PHP_VERSION}")"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user