mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
parent
d3e735e549
commit
ab492c0efe
6 changed files with 35 additions and 5 deletions
|
@ -21,7 +21,7 @@
|
|||
"email": ""
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.2.4"
|
||||
"yunohost": ">= 4.3.2"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
YNH_PHP_VERSION="7.3"
|
||||
|
||||
# Package dependencies
|
||||
extra_php_dependencies="php-pear php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
||||
pkg_dependencies="php-pear php${YNH_PHP_VERSION}-ldap php${YNH_PHP_VERSION}-mysql php${YNH_PHP_VERSION}-cli php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-json php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-curl"
|
||||
|
||||
# Composer version
|
||||
YNH_COMPOSER_VERSION=2.1.1
|
||||
|
|
|
@ -60,6 +60,13 @@ db_user=$db_name
|
|||
ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
ynh_mysql_setup_db --db_user=$db_name --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# INSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Installing dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# CREATE DEDICATED USER
|
||||
#=================================================
|
||||
|
@ -95,7 +102,7 @@ ynh_add_nginx_config
|
|||
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -38,6 +38,14 @@ ynh_script_progression --message="Removing the MySQL database..." --weight=2
|
|||
# Remove a database if it exists, along with the associated user
|
||||
ynh_mysql_remove_db --db_user=$db_name --db_name=$db_name
|
||||
|
||||
#=================================================
|
||||
# REMOVE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Removing dependencies..." --weight=1
|
||||
|
||||
# Remove metapackage and its dependencies
|
||||
ynh_remove_app_dependencies
|
||||
|
||||
#=================================================
|
||||
# REMOVE APP MAIN DIR
|
||||
#=================================================
|
||||
|
|
|
@ -68,10 +68,18 @@ chown -R $app:www-data "$final_path"
|
|||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the PHP-FPM configuration..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
ynh_add_fpm_config
|
||||
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
#=================================================
|
||||
# REINSTALL DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=1
|
||||
|
||||
# Define and install dependencies
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC RESTORATION
|
||||
|
|
|
@ -124,13 +124,20 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
|
|||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
||||
#=================================================
|
||||
# UPGRADE DEPENDENCIES
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading dependencies..." --weight=1
|
||||
|
||||
ynh_install_app_dependencies $pkg_dependencies
|
||||
|
||||
#=================================================
|
||||
# PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=5
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
|
|
Loading…
Reference in a new issue