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:
Éric Gaspar 2024-06-24 10:54:07 +02:00
parent be42486c48
commit 53bb02f947
4 changed files with 8 additions and 55 deletions

View file

@ -65,4 +65,4 @@ ram.runtime = "50M"
api.protected = true api.protected = true
[resources.apt] [resources.apt]
packages = "php8.2-ldap, php8.2-mbstring, php8.2-fileinfo, php8.2-sqlite3, php8.2-gd, php8.2-intl" packages = "php8.3-ldap, php8.3-mbstring, php8.3-fileinfo, php8.3-sqlite3, php8.3-gd, php8.3-intl"

View file

@ -13,15 +13,11 @@ ynh_print_info "Declaring files to be backed up..."
ynh_backup "$install_dir" ynh_backup "$install_dir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# BACKUP THE PHP-FPM CONFIGURATION
#=================================================
ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
#================================================= #=================================================

View file

@ -3,22 +3,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# MANAGE SCRIPT FAILURE
#=================================================
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | fpm_footprint="low"
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | fpm_free_footprint=0
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | fpm_usage="low"
#=================================================
# STORE SETTINGS FROM MANIFEST
#=================================================
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_footprint --value=$fpm_footprint
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --key=fpm_free_footprint --value=$fpm_free_footprint
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================

View file

@ -3,40 +3,14 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
ynh_script_progression "Ensuring downward compatibility..."
# If fpm_footprint doesn't exist, create it
if [ -z "${fpm_footprint:-}" ]; then
fpm_footprint=low
# REMOVEME ? Everything about fpm_footprint is removed in helpers2.1... | ynh_app_setting_set --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
# REMOVEME ? Everything about fpm_free_footprint is removed in helpers2.1... | ynh_app_setting_set --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
# REMOVEME ? Everything about fpm_usage is removed in helpers2.1... | ynh_app_setting_set --key=fpm_usage --value=$fpm_usage
fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression "Upgrading source files..."
if ynh_app_upstream_version_changed ynh_setup_source --dest_dir="$install_dir" --keep="data"
then
ynh_script_progression "Upgrading source files..."
ynh_setup_source --dest_dir="$install_dir" --keep="data" ynh_safe_rm "$install_dir/data/viewcache/*"
ynh_safe_rm "$install_dir/data/viewcache/*"
fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir" chown -R $app:www-data "$install_dir"
@ -48,17 +22,16 @@ ynh_script_progression "Upgrading NGINX web server configuration..."
ynh_config_add_nginx ynh_config_add_nginx
# Create a dedicated php-fpm config
ynh_config_add_phpfpm ynh_config_add_phpfpm
#================================================= #=================================================
# MODIFY A CONFIG FILE # MODIFY A CONFIG FILE
#================================================= #=================================================
#ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php" ynh_config_add --template="config-dist.php" --destination="$install_dir/data/config.php"
#chmod 400 "$install_dir/data/config.php" chmod 400 "$install_dir/data/config.php"
#chown $app "$install_dir/data/config.php" chown $app "$install_dir/data/config.php"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT