1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/tiki_ynh.git synced 2024-09-04 01:15:54 +02:00
This commit is contained in:
Éric Gaspar 2024-08-31 15:36:19 +02:00
parent 4b62e8499a
commit 1487b32204
6 changed files with 14 additions and 76 deletions

View file

@ -5,7 +5,7 @@ name = "Tiki"
description.en = "Wiki-based, content management system"
description.fr = "Système de gestion de contenu basé sur Wiki"
version = "26.2~ynh1"
version = "26.2~ynh2"
maintainers = []
@ -17,7 +17,7 @@ admindoc = "https://doc.tiki.org"
code = "https://gitlab.com/tikiwiki/tiki/"
[integration]
yunohost = ">= 11.2.18"
yunohost = ">= 11.2.29"
helpers_version = "2.1"
architectures = "all"
multi_instance = true

View file

@ -1,6 +1,5 @@
#!/bin/bash
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@ -19,15 +18,11 @@ ynh_backup "$install_dir"
ynh_backup "$data_dir"
#=================================================
# BACKUP THE NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
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"
#=================================================

View file

@ -5,18 +5,6 @@ source /usr/share/yunohost/helpers
ynh_app_setting_set --key=php_upload_max_filesize --value=256M
#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
#=================================================
@ -31,17 +19,13 @@ fi
ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression "Configuring NGINX web server..."
ynh_script_progression "Adding system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm
#=================================================

View file

@ -8,13 +8,10 @@ source /usr/share/yunohost/helpers
#=================================================
ynh_script_progression "Removing system configurations related to $app..."
# Remove the app-specific logrotate config
ynh_config_remove_logrotate
# Remove the dedicated NGINX config
ynh_config_remove_nginx
# Remove the dedicated PHP-FPM config
ynh_config_remove_phpfpm
#=================================================

View file

@ -1,6 +1,5 @@
#!/bin/bash
# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..."
ynh_restore "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE THE DATA DIRECTORY
#=================================================
@ -32,8 +29,6 @@ ynh_mysql_db_shell < ./db.sql
#=================================================
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression "Restoring system configurations related to $app..."
ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf"

View file

@ -10,41 +10,13 @@ ynh_app_setting_set_default --key=php_upload_max_filesize --value=256M
#=================================================
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
# If release_cycle doesn't exist, create it
# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=release_cycle --value=longterm
if [ -z "${release_cycle:-}" ]; then
release_cycle=longterm
ynh_app_setting_set --key=release_cycle --value=$release_cycle
fi
ynh_app_setting_set_default --key=release_cycle --value=longterm
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
# FIXME: this is still supported but the recommendation is now to *always* re-setup the app sources wether or not the upstream sources changed
if ynh_app_upstream_version_changed
then
ynh_script_progression "Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
source_id_to_use="main"
if [[ "$release_cycle" == "longterm" ]]
then
@ -52,22 +24,17 @@ then
fi
ynh_setup_source --dest_dir="$install_dir" --source_id="$source_id_to_use"
fi
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir"
#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir"
# Update database
(cd "$install_dir" && ynh_exec_as_app php${php_version} --define apc.enable_cli=1 console.php database:update)
#=================================================
# NGINX CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression "Upgrading NGINX web server configuration..."
ynh_script_progression "Upgrading system configurations related to $app..."
# Create a dedicated NGINX config
ynh_config_add_nginx
# Create a dedicated PHP-FPM config
ynh_config_add_phpfpm
#=================================================