1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00
This commit is contained in:
ericgaspar 2024-06-01 23:05:37 +02:00
parent d4a3e03fa0
commit cc401d5d3b
3 changed files with 6 additions and 59 deletions

View file

@ -27,10 +27,6 @@ ynh_backup --src_path="$install_dir"
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================

View file

@ -9,22 +9,6 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
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
#=================================================
@ -42,7 +26,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=10
ynh_add_nginx_config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config
#=================================================
# MODIFY A CONFIG FILE

View file

@ -9,46 +9,13 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
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
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
ynh_script_progression --message="Upgrading source files..." --weight=5
if [ "$upgrade_type" == "UPGRADE_APP" ]
then
ynh_script_progression --message="Upgrading source files..." --weight=5
ynh_setup_source --dest_dir="$install_dir" --keep="data"
ynh_secure_remove --file="$install_dir/data/viewcache/*"
fi
ynh_setup_source --dest_dir="$install_dir" --keep="data"
ynh_secure_remove --file="$install_dir/data/viewcache/*"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
@ -61,13 +28,13 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." -
ynh_add_nginx_config
# Create a dedicated php-fpm config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
ynh_add_fpm_config
#=================================================
# MODIFY A CONFIG FILE
#=================================================
#ynh_add_config --template="../conf/config-dist.php" --destination="$install_dir/data/config.php"
#ynh_add_config --template="config-dist.php" --destination="$install_dir/data/config.php"
#chmod 400 "$install_dir/data/config.php"
#chown $app "$install_dir/data/config.php"