1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/firefly-iii-di_ynh.git synced 2024-09-03 18:36:21 +02:00
This commit is contained in:
YunoHost Bot 2024-07-10 20:30:12 +02:00 committed by GitHub
commit de2b1c5d0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 113 additions and 150 deletions

View file

@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Firefly III Importer for YunoHost # Firefly III Importer for YunoHost
[![Integration level](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![Working status](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![Integration level](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![Working status](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![Install Firefly III Importer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![Install Firefly III Importer with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**Shipped version:** 1.2.2~ynh1 **Shipped version:** 1.5.2~ynh1
## Screenshots ## Screenshots

View file

@ -5,7 +5,7 @@ No se debe editar a mano.
# Firefly III Importer para Yunohost # Firefly III Importer para Yunohost
[![Nivel de integración](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![Instalar Firefly III Importer con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![Instalar Firefly III Importer con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**Versión actual:** 1.2.2~ynh1 **Versión actual:** 1.5.2~ynh1
## Capturas ## Capturas

View file

@ -5,7 +5,7 @@ EZ editatu eskuz.
# Firefly III Importer YunoHost-erako # Firefly III Importer YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![Integrazio maila](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![Instalatu Firefly III Importer YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![Instalatu Firefly III Importer YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**Paketatutako bertsioa:** 1.2.2~ynh1 **Paketatutako bertsioa:** 1.5.2~ynh1
## Pantaila-argazkiak ## Pantaila-argazkiak

View file

@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Firefly III Importer pour YunoHost # Firefly III Importer pour YunoHost
[![Niveau dintégration](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![Niveau dintégration](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![Installer Firefly III Importer avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![Installer Firefly III Importer avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**Version incluse:** 1.2.2~ynh1 **Version incluse:** 1.5.2~ynh1
## Captures décran ## Captures décran

View file

@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Firefly III Importer para YunoHost # Firefly III Importer para YunoHost
[![Nivel de integración](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![Nivel de integración](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![Instalar Firefly III Importer con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![Instalar Firefly III Importer con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**Versión proporcionada:** 1.2.2~ynh1 **Versión proporcionada:** 1.5.2~ynh1
## Capturas de pantalla ## Capturas de pantalla

View file

@ -5,7 +5,7 @@
# YunoHost 上的 Firefly III Importer # YunoHost 上的 Firefly III Importer
[![集成程度](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://dash.yunohost.org/appci/app/firefly-iii-di) ![工作状态](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg) [![集成程度](https://dash.yunohost.org/integration/firefly-iii-di.svg)](https://ci-apps.yunohost.org/ci/apps/firefly-iii-di/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/firefly-iii-di.maintain.svg)
[![使用 YunoHost 安装 Firefly III Importer](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di) [![使用 YunoHost 安装 Firefly III Importer](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=firefly-iii-di)
@ -26,7 +26,7 @@ If your Firefly-III server is installed as a YunoHost app, please note:
- When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine. - When configuring the Data Importer, use the public Firefly-III domain and path, not *localhost*, even if both services are on the same machine.
**分发版本:** 1.2.2~ynh1 **分发版本:** 1.5.2~ynh1
## 截图 ## 截图

View file

@ -84,6 +84,14 @@ USE_CACHE=false
# #
IGNORE_DUPLICATE_ERRORS=false IGNORE_DUPLICATE_ERRORS=false
#
# If you set this to true, the importer will not complain about transactions that can't be found after they've
# been imported. This happens when rule on the Firefly III side deletes the transaction immediately after creating it.
# This can be useful when you have a rule that immediately deletes GoCardless' "pending" transactions. Setting this
# to true reduces some noise.
#
IGNORE_NOT_FOUND_TRANSACTIONS=false
# #
# Auto import settings. Due to security constraints, you MUST enable each feature individually. # Auto import settings. Due to security constraints, you MUST enable each feature individually.
# You must also set a secret. The secret is used for the web routes. # You must also set a secret. The secret is used for the web routes.
@ -116,6 +124,16 @@ CAN_POST_FILES=false
# #
IMPORT_DIR_ALLOWLIST= IMPORT_DIR_ALLOWLIST=
#
# If you import from a directory, you can save a fallback configuration file in the directory.
# This file must be called "_fallback.json" and will be used when your CSV or CAMT.053 file is not accompanied
# by a configuration file.
#
# This fallback configuration will only be used if this variable is set to true.
# https://docs.firefly-iii.org/how-to/data-importer/advanced/post/#importing-a-local-directory
#
FALLBACK_IN_DIR=false
# #
# When you're running Firefly III under a (self-signed) certificate, # When you're running Firefly III under a (self-signed) certificate,
# the data importer may have trouble verifying the TLS connection. # the data importer may have trouble verifying the TLS connection.
@ -147,6 +165,11 @@ APP_ENV=local
APP_DEBUG=false APP_DEBUG=false
LOG_CHANNEL=stack LOG_CHANNEL=stack
#
# If you turn this on, expect massive logs with lots of privacy sensitive data
#
LOG_RETURN_JSON=false
# Log level. You can set this from least severe to most severe: # Log level. You can set this from least severe to most severe:
# debug, info, notice, warning, error, critical, alert, emergency # debug, info, notice, warning, error, critical, alert, emergency
# If you set it to debug your logs will grow large, and fast. If you set it to emergency probably # If you set it to debug your logs will grow large, and fast. If you set it to emergency probably
@ -155,18 +178,13 @@ LOG_LEVEL=notice
# TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy. # TRUSTED_PROXIES is a useful variable when using Docker and/or a reverse proxy.
# Set it to ** and reverse proxies work just fine. # Set it to ** and reverse proxies work just fine.
TRUSTED_PROXIES=* TRUSTED_PROXIES=**
# #
# Time zone # Time zone
# #
TZ=Europe/Amsterdam TZ=Europe/Amsterdam
#
# Use ASSET_URL when you're running the data importer in a sub-directory.
#
ASSET_URL=https://__DOMAIN____PATH__
# #
# Email settings. # Email settings.
# The data importer can send you a message with all errors, warnings and messages # The data importer can send you a message with all errors, warnings and messages
@ -224,6 +242,16 @@ REDIS_PORT=6379
REDIS_DB="0" REDIS_DB="0"
REDIS_CACHE_DB="1" REDIS_CACHE_DB="1"
#
# Use ASSET_URL when your data importer webpages are served from a URL with a subfolder path
# This pre-appends the subfolder path in front of URLs for browser-side assets such as CSS Files.
# Example: If your webserver (i.e. NGINX) is configured to serve the data importer webpages from
# http://localhost/ff3di, set ASSET_URL = /ff3di
# and it will pre-append that value to any requests for browser-side assets
# 1) Make sure you REMOVE any trailing slash from the end of the URL.
#
ASSET_URL=__PATH__
# The only tracker supported is Matomo. # The only tracker supported is Matomo.
# This is used on the public instance over at https://data-importer.firefly-iii.org # This is used on the public instance over at https://data-importer.firefly-iii.org
TRACKER_SITE_ID= TRACKER_SITE_ID=
@ -238,4 +266,3 @@ APP_NAME=DataImporter
# Laravel uses this to generate links on the command line, which is a feature the data importer does not use. # Laravel uses this to generate links on the command line, which is a feature the data importer does not use.
# #
APP_URL=https://__DOMAIN____PATH__ APP_URL=https://__DOMAIN____PATH__

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json
packaging_format = 2 packaging_format = 2
id = "firefly-iii-di" id = "firefly-iii-di"
@ -5,7 +7,7 @@ name = "Firefly III Importer"
description.en = "Firefly III Data Importer" description.en = "Firefly III Data Importer"
description.fr = "Importateur de données Firefly III" description.fr = "Importateur de données Firefly III"
version = "1.2.2~ynh1" version = "1.5.2~ynh1"
maintainers = [] maintainers = []
@ -41,10 +43,10 @@ ram.runtime = "50M"
type = "user" type = "user"
[resources] [resources]
[resources.sources.main] [resources.sources.main]
url = "https://github.com/firefly-iii/data-importer/archive/refs/tags/v1.2.2.tar.gz" url = "https://github.com/firefly-iii/data-importer/archive/refs/tags/v1.5.2.tar.gz"
sha256 = "2e69f8b68ab8fd0f078e585feb2128b99bf2dd3088c057d2dbd1c75a20860732" sha256 = "ee1debfe137c04e4152bf7ebb6bb50cbd6c4ab2d7dd64bee05b93f7e6c25f7d7"
autoupdate.strategy = "latest_github_tag" autoupdate.strategy = "latest_github_tag"
[resources.system_user] [resources.system_user]
@ -54,4 +56,7 @@ ram.runtime = "50M"
main.url = "/" main.url = "/"
[resources.apt] [resources.apt]
packages = "php8.2-xml php8.2-bcmath" packages = [
"php8.3-xml",
"php8.3-bcmath",
]

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -22,23 +20,13 @@ ynh_print_info --message="Declaring files to be backed up..."
ynh_backup --src_path="$install_dir" ynh_backup --src_path="$install_dir"
#================================================= #=================================================
# BACKUP THE NGINX CONFIGURATION # BACKUP THE SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" 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" ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
# ynh_backup --src_path="/etc/cron.d/$app"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT
#================================================= #=================================================

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC STARTING
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -9,15 +7,6 @@
source _common.sh source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#=================================================
# LOAD SETTINGS
#=================================================
email=$(ynh_user_get_info --username=$admin --key=mail)
timezone="$(cat /etc/timezone)"
#=================================================
# STANDARD MODIFICATIONS
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
#================================================= #=================================================
@ -30,12 +19,12 @@ ynh_change_url_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Modifying a config file..." ynh_script_progression --message="Modifying a config file..."
domain="$new_domain" email=$(ynh_user_get_info --username="$admin" --key="mail")
path="$new_path" timezone="$(cat /etc/timezone)"
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env" chmod 400 "$install_dir/.env"
chown $app "$install_dir/.env" chown "$app" "$install_dir/.env"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -10,25 +8,21 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST # INITIALIZE AND STORE SETTINGS
#================================================= #=================================================
random_key=$(ynh_string_random --length=32) random_key=$(ynh_string_random --length=32)
email=$(ynh_user_get_info --username=$admin --key=mail) ynh_app_setting_set --app="$app" --key="random_key" --value="$random_key"
email=$(ynh_user_get_info --username="$admin" --key="mail")
timezone="$(cat /etc/timezone)" timezone="$(cat /etc/timezone)"
fpm_footprint="low" fpm_footprint="low"
fpm_free_footprint=0 fpm_free_footprint=0
fpm_usage="low" fpm_usage="low"
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"
# STORE SETTINGS FROM MANIFEST ynh_app_setting_set --app="$app" --key="fpm_usage" --value="$fpm_usage"
#=================================================
ynh_app_setting_set --app=$app --key=random_key --value=$random_key
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
@ -39,27 +33,9 @@ ynh_script_progression --message="Setting up source files..."
ynh_setup_source --dest_dir=$install_dir ynh_setup_source --dest_dir=$install_dir
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"
chmod -R 775 $install_dir/storage chmod -R 775 "$install_dir/storage"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC SETUP
#================================================= #=================================================
# INSTALL COMPOSER DEPENDENCIES # INSTALL COMPOSER DEPENDENCIES
#================================================= #=================================================
@ -72,10 +48,20 @@ ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$i
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." ynh_script_progression --message="Adding a configuration file..."
ynh_add_config --template="../conf/.env" --destination="$install_dir/.env" ynh_add_config --template=".env" --destination="$install_dir/.env"
chmod 400 "$install_dir/.env" chmod 400 "$install_dir/.env"
chown $app "$install_dir/.env" chown "$app" "$install_dir/.env"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -10,18 +8,13 @@ source _common.sh
source /usr/share/yunohost/helpers source /usr/share/yunohost/helpers
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the dedicated NGINX config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#=================================================
# REMOVE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Removing PHP-FPM configuration..."
# Remove the dedicated PHP-FPM config # Remove the dedicated PHP-FPM config
ynh_remove_fpm_config ynh_remove_fpm_config

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -18,30 +16,24 @@ ynh_script_progression --message="Restoring the app main directory..."
ynh_restore_file --origin_path="$install_dir" ynh_restore_file --origin_path="$install_dir"
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"
#================================================= #=================================================
# RESTORE THE PHP-FPM CONFIGURATION # RESTORE SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Restoring the PHP-FPM configuration..." 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"
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..."
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"
#================================================= #=================================================
# GENERIC FINALIZATION # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#================================================= #=================================================
# RELOAD NGINX AND PHP-FPM ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
#=================================================
ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." ynh_systemd_action --service_name="php$phpversion-fpm" --action=reload
ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================

View file

@ -1,7 +1,5 @@
#!/bin/bash #!/bin/bash
#=================================================
# GENERIC START
#================================================= #=================================================
# IMPORT GENERIC HELPERS # IMPORT GENERIC HELPERS
#================================================= #=================================================
@ -16,12 +14,6 @@ source /usr/share/yunohost/helpers
email=$(ynh_user_get_info --username=$admin --key=mail) email=$(ynh_user_get_info --username=$admin --key=mail)
timezone="$(cat /etc/timezone)" timezone="$(cat /etc/timezone)"
#=================================================
# CHECK VERSION
#=================================================
upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
# ENSURE DOWNWARD COMPATIBILITY # ENSURE DOWNWARD COMPATIBILITY
#================================================= #=================================================
@ -48,43 +40,32 @@ fi
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
ynh_script_progression --message="Upgrading source files..."
if [ "$upgrade_type" == "UPGRADE_APP" ] # Download, check integrity, uncompress and patch the source from app.src
then ynh_setup_source --dest_dir="$install_dir" --keep=".env storage/upload storage/export"
ynh_script_progression --message="Upgrading source files..."
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --keep=".env storage/upload storage/export"
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"
chmod -R 775 $install_dir/storage chmod -R 775 "$install_dir/storage"
#=================================================
# PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint
#=================================================
# NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..."
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#================================================= #=================================================
# UPDATE PHP DEPENDENCIES # UPDATE PHP DEPENDENCIES
#================================================= #=================================================
ynh_script_progression --message="Updating PHP dependencies..." ynh_script_progression --message="Installing composer dependencies..."
ynh_exec_warn_less ynh_install_composer ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion="$phpversion" --usage="$fpm_usage" --footprint="$fpm_footprint"
# Create a dedicated NGINX config
ynh_add_nginx_config
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -1,3 +1,5 @@
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
test_format = 1.0 test_format = 1.0
[default] [default]