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:
parent
7560de021f
commit
17ca635d45
3 changed files with 15 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue