1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ampache_ynh.git synced 2024-09-03 18:15:55 +02:00

refactor: use 3.8 yunohost php-fpm helpers

This commit is contained in:
HugoPoi 2020-05-07 16:54:06 +02:00
parent 7560de021f
commit 17ca635d45
3 changed files with 15 additions and 7 deletions

View file

@ -1,4 +1,11 @@
#!/bin/bash
#=================================================
# COMMON VARIABLES
#=================================================
pkg_dependencies="libav-tools"
YNH_PHP_VERSION="7.3"
extra_php_dependencies="php${YNH_PHP_VERSION}-xml php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-ldap"
#=================================================
# EXPERIMENTAL HELPERS

View file

@ -55,7 +55,7 @@ ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
ynh_script_progression --message="Installing dependencies..." --weight=25
ynh_install_app_dependencies libav-tools php-cli
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE A MYSQL DATABASE
@ -81,7 +81,7 @@ ynh_setup_source --dest_dir="$final_path"
ynh_script_progression --message="Configuring nginx web server..."
# Create a dedicated nginx config
ynh_add_nginx_config
ynh_add_nginx_config YNH_PHP_VERSION
#=================================================
# CREATE DEDICATED USER
@ -97,7 +97,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Configuring php-fpm..."
# Create a dedicated php-fpm config
ynh_add_fpm_config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
#=================================================
# SPECIFIC SETUP

View file

@ -106,15 +106,16 @@ fi
#=================================================
ynh_script_progression --message="Upgrading nginx web server configuration..." --weight=3
# Create a dedicated nginx config
ynh_add_nginx_config
# Re-create a dedicated nginx config
ynh_remove_nginx_config
ynh_add_nginx_config YNH_PHP_VERSION
#=================================================
# UPGRADE DEPENDENCIES
#=================================================
ynh_script_progression --message="Upgrading dependencies..." --weight=5
ynh_install_app_dependencies libav-tools php-cli
ynh_install_app_dependencies $pkg_dependencies
#=================================================
# CREATE DEDICATED USER
@ -130,7 +131,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Upgrading php-fpm configuration..." --weight=2
# Create a dedicated php-fpm config
ynh_add_fpm_config
ynh_add_fpm_config --phpversion="$YNH_PHP_VERSION" --package="$extra_php_dependencies"
#=================================================
# SPECIFIC UPGRADE