diff --git a/scripts/_common.sh b/scripts/_common.sh index b128cee..58aaca8 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -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 diff --git a/scripts/install b/scripts/install index e8e86f1..085b4da 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index e75754c..94f716d 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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