mirror of
https://github.com/YunoHost-Apps/snappymail_ynh.git
synced 2024-09-03 20:26:29 +02:00
cleaning
This commit is contained in:
parent
95fb2c2031
commit
c090444d3f
4 changed files with 2 additions and 37 deletions
|
@ -9,22 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# RETRIEVE ARGUMENTS FROM THE MANIFEST
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
fpm_footprint="low"
|
|
||||||
fpm_free_footprint=0
|
|
||||||
fpm_usage="low"
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STORE SETTINGS FROM MANIFEST
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -42,7 +26,7 @@ chown -R $app:www-data "$install_dir"
|
||||||
ynh_script_progression --message="Adding system configurations related to $app..." --weight=3
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=3
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
|
@ -26,7 +26,6 @@ chown -R $app:www-data "$install_dir"
|
||||||
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||||
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint --phpversion=$phpversion
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
|
|
|
@ -14,24 +14,6 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If fpm_footprint doesn't exist, create it
|
|
||||||
if [ -z "${fpm_footprint:-}" ]; then
|
|
||||||
fpm_footprint=low
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_footprint --value=$fpm_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If fpm_free_footprint doesn't exist, create it
|
|
||||||
if [ -z "${fpm_free_footprint:-}" ]; then
|
|
||||||
fpm_free_footprint=0
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_free_footprint --value=$fpm_free_footprint
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If fpm_usage doesn't exist, create it
|
|
||||||
if [ -z "${fpm_usage:-}" ]; then
|
|
||||||
fpm_usage=low
|
|
||||||
ynh_app_setting_set --app=$app --key=fpm_usage --value=$fpm_usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Do something when upgrading from 2.3.2~ynh1 or lower
|
# Do something when upgrading from 2.3.2~ynh1 or lower
|
||||||
if ynh_compare_current_package_version --comparison le --version 2.28.4~ynh1
|
if ynh_compare_current_package_version --comparison le --version 2.28.4~ynh1
|
||||||
then
|
then
|
||||||
|
@ -60,7 +42,7 @@ chown -R $app:www-data "$install_dir"
|
||||||
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=5
|
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=5
|
||||||
|
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
|
ynh_add_fpm_config
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
Loading…
Reference in a new issue