1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/flarum_ynh.git synced 2024-09-03 18:36:24 +02:00

Appease linter: install PHP dependencies with apt helper

This commit is contained in:
tituspijean 2022-08-05 10:55:58 +02:00
parent 93177dfa7d
commit a95fe798f2
No known key found for this signature in database
GPG key ID: EF3B0D7CC0A94720
4 changed files with 16 additions and 16 deletions

View file

@ -2,16 +2,16 @@
# COMMON VARIABLES
#=================================================
# dependencies used by the app
pkg_dependencies=""
swap_needed=1024
# PHP
YNH_PHP_VERSION="7.3"
YNH_COMPOSER_VERSION="2.0.13"
extra_php_dependencies="php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-pdo-mysql php${YNH_PHP_VERSION}-tokenizer php${YNH_PHP_VERSION}-zip"
# dependencies used by the app
pkg_dependencies="$extra_php_dependencies"
# Version numbers
project_version="1.4.0"
#core_version is now retrieved from the manifest

View file

@ -116,7 +116,7 @@ ynh_add_nginx_config
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
ynh_add_fpm_config --usage=low --footprint=low
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================

View file

@ -71,16 +71,6 @@ chmod 750 "$final_path"
chmod -R o-rwx "$final_path"
chown -R $app:www-data "$final_path"
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
#=================================================
# SPECIFIC RESTORATION
#=================================================
@ -91,6 +81,16 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=2
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..."
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low
#=================================================
# RESTORE THE MYSQL DATABASE
#=================================================

View file

@ -158,7 +158,7 @@ ynh_install_app_dependencies $pkg_dependencies
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=1
# Create a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
ynh_add_fpm_config --usage=low --footprint=low
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================