From 18135c5e1d102a786d4e8562318131524d272a59 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 6 Apr 2024 15:29:24 +0000 Subject: [PATCH 01/16] Auto-update READMEs --- ALL_README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALL_README.md b/ALL_README.md index 332d266..77b7509 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,6 @@ # All available README files by language - [Read the README in English](README.md) +- [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) -- [Leggi il “README” in italiano](README_it.md) \ No newline at end of file From d4a3e03fa0a0bff1710fa559dbe3a345efe947e2 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 1 Jun 2024 23:02:47 +0200 Subject: [PATCH 02/16] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 9586ec0..8e9686d 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,7 +20,7 @@ yunohost = ">= 11.2" architectures = "all" multi_instance = true -ldap = true +ldap = false sso = false From c41b6ef98eb97d449106e6ffec54c6be579e4cf8 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 1 Jun 2024 21:02:52 +0000 Subject: [PATCH 03/16] Auto-update READMEs --- ALL_README.md | 2 ++ README_es.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ README_zh_Hans.md | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 98 insertions(+) create mode 100644 README_es.md create mode 100644 README_zh_Hans.md diff --git a/ALL_README.md b/ALL_README.md index 77b7509..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,6 +1,8 @@ # All available README files by language - [Read the README in English](README.md) +- [Lea el README en español](README_es.md) - [Irakurri README euskaraz](README_eu.md) - [Lire le README en français](README_fr.md) - [Le o README en galego](README_gl.md) +- [阅读中文(简体)的 README](README_zh_Hans.md) diff --git a/README_es.md b/README_es.md new file mode 100644 index 0000000..c8fd9e3 --- /dev/null +++ b/README_es.md @@ -0,0 +1,48 @@ + + +# Grocy para Yunohost + +[![Nivel de integración](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) + +[![Instalar Grocy con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) + +*[Leer este README en otros idiomas.](./ALL_README.md)* + +> *Este paquete le permite instalarGrocy rapidamente y simplement en un servidor YunoHost.* +> *Si no tiene YunoHost, visita [the guide](https://yunohost.org/install) para aprender como instalarla.* + +## Descripción general + +grocy is a web-based self-hosted groceries & household management solution for your home. + +**Versión actual:** 4.2.0~ynh1 + +**Demo:** + +## Capturas + +![Captura de Grocy](./doc/screenshots/stock-en.png) + +## Documentaciones y recursos + +- Sitio web oficial: +- Repositorio del código fuente oficial de la aplicación : +- Catálogo YunoHost: +- Reportar un error: + +## Información para desarrolladores + +Por favor enviar sus correcciones a la [`branch testing`](https://github.com/YunoHost-Apps/grocy_ynh/tree/testing + +Para probar la rama `testing`, sigue asÍ: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/grocy_ynh/tree/testing --debug +o +sudo yunohost app upgrade grocy -u https://github.com/YunoHost-Apps/grocy_ynh/tree/testing --debug +``` + +**Mas informaciones sobre el empaquetado de aplicaciones:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md new file mode 100644 index 0000000..417ad5c --- /dev/null +++ b/README_zh_Hans.md @@ -0,0 +1,48 @@ + + +# YunoHost 上的 Grocy + +[![集成程度](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![工作状态](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) + +[![使用 YunoHost 安装 Grocy](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) + +*[阅读此 README 的其它语言版本。](./ALL_README.md)* + +> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Grocy。* +> *如果您还没有 YunoHost,请参阅[指南](https://yunohost.org/install)了解如何安装它。* + +## 概况 + +grocy is a web-based self-hosted groceries & household management solution for your home. + +**分发版本:** 4.2.0~ynh1 + +**演示:** + +## 截图 + +![Grocy 的截图](./doc/screenshots/stock-en.png) + +## 文档与资源 + +- 官方应用网站: +- 上游应用代码库: +- YunoHost 商店: +- 报告 bug: + +## 开发者信息 + +请向 [`testing` 分支](https://github.com/YunoHost-Apps/grocy_ynh/tree/testing) 发送拉取请求。 + +如要尝试 `testing` 分支,请这样操作: + +```bash +sudo yunohost app install https://github.com/YunoHost-Apps/grocy_ynh/tree/testing --debug +或 +sudo yunohost app upgrade grocy -u https://github.com/YunoHost-Apps/grocy_ynh/tree/testing --debug +``` + +**有关应用打包的更多信息:** From cc401d5d3b14d5c18625945e3ab482aae1095b83 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 1 Jun 2024 23:05:37 +0200 Subject: [PATCH 04/16] cleaning --- scripts/backup | 4 ---- scripts/install | 18 +----------------- scripts/upgrade | 43 +++++-------------------------------------- 3 files changed, 6 insertions(+), 59 deletions(-) diff --git a/scripts/backup b/scripts/backup index 6854aaa..e2e0c78 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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" #================================================= diff --git a/scripts/install b/scripts/install index 711ba42..c8629ee 100644 --- a/scripts/install +++ b/scripts/install @@ -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 diff --git a/scripts/upgrade b/scripts/upgrade index b15c0a5..c78fc96 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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" From 7775de0dee0257e62e337c1e2d0bccfb99ffe8ab Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sat, 1 Jun 2024 23:07:05 +0200 Subject: [PATCH 05/16] remove config panel --- config_panel.toml => config_panel.toml.example | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename config_panel.toml => config_panel.toml.example (100%) diff --git a/config_panel.toml b/config_panel.toml.example similarity index 100% rename from config_panel.toml rename to config_panel.toml.example From e1f1103d4402507fe16416cff5ba431e612cb7e8 Mon Sep 17 00:00:00 2001 From: spaced Date: Mon, 24 Jun 2024 01:50:33 -0700 Subject: [PATCH 06/16] Enable LDAP (#72) * Allow for LDAP authentication * Change filter --------- Co-authored-by: ericgaspar --- conf/config-dist.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/conf/config-dist.php b/conf/config-dist.php index 3355c57..511bc3f 100644 --- a/conf/config-dist.php +++ b/conf/config-dist.php @@ -81,7 +81,7 @@ Setting('DISABLE_AUTH', false); // Either "Grocy\Middleware\DefaultAuthMiddleware", "Grocy\Middleware\ReverseProxyAuthMiddleware" // or any class that implements Grocy\Middleware\AuthMiddleware -Setting('AUTH_CLASS', 'Grocy\Middleware\DefaultAuthMiddleware'); +Setting('AUTH_CLASS', 'Grocy\Middleware\LdapAuthMiddleware'); // Options when using ReverseProxyAuthMiddleware Setting('REVERSE_PROXY_AUTH_HEADER', 'REMOTE_USER'); // The name of the HTTP header which your reverse proxy uses to pass the username (on successful authentication) @@ -92,8 +92,8 @@ Setting('LDAP_ADDRESS', 'ldap://127.0.0.1:389'); // Example value "ldap://vm-dc2 Setting('LDAP_BASE_DN', 'ou=users,dc=yunohost,dc=org'); // Example value "DC=local,DC=berrnd,DC=net" Setting('LDAP_BIND_DN', ''); // Example value "CN=grocy_bind_account,OU=service_accounts,DC=local,DC=berrnd,DC=net" Setting('LDAP_BIND_PW', ''); // Password for the above account -Setting('LDAP_USER_FILTER', ''); // Example value "(OU=grocy_users)" -Setting('LDAP_UID_ATTR', ''); // Windows AD: "sAMAccountName", OpenLDAP: "uid", GLAuth: "cn" +Setting('LDAP_USER_FILTER', '(&(|(objectclass=posixAccount))(permission=cn=__APP__.main,ou=permission,dc=yunohost,dc=org))'); // Example value "(OU=grocy_users)" +Setting('LDAP_UID_ATTR', 'uid'); // Windows AD: "sAMAccountName", OpenLDAP: "uid", GLAuth: "cn" // Default permissions for new users // the array needs to contain the technical/constant names From ef3b0390aa39121ebd25264152aa3cf6afb5544c Mon Sep 17 00:00:00 2001 From: Salamandar <6552989+Salamandar@users.noreply.github.com> Date: Mon, 24 Jun 2024 10:51:10 +0200 Subject: [PATCH 07/16] [autopatch] TEST BEFORE MERGE ynh_setup_source --full_replace=1 (#69) * [autopatch] TEST BEFORE MERGE ynh_setup_source --full_replace=1 * Auto-update README * Auto-update READMEs --------- Co-authored-by: Yunohost-Bot <> Co-authored-by: eric_G <46165813+ericgaspar@users.noreply.github.com> Co-authored-by: yunohost-bot Co-authored-by: ericgaspar --- scripts/upgrade | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index c78fc96..e0a2ebf 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -14,7 +14,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression --message="Upgrading source files..." --weight=5 -ynh_setup_source --dest_dir="$install_dir" --keep="data" +ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="data" ynh_secure_remove --file="$install_dir/data/viewcache/*" chmod -R o-rwx "$install_dir" From 73da9ed5327acb96f56b10b6ada7ea44057073dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:24:49 +0200 Subject: [PATCH 08/16] Update manifest.toml --- manifest.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.toml b/manifest.toml index 8e9686d..11b4d09 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Grocy" description.en = "Web-based groceries & household management solution for your home" description.fr = "Solution Web de gestion d'épicerie et de gestion de la maison" -version = "4.2.0~ynh1" +version = "4.2.0~ynh2" maintainers = [] From 4e449177d900b98650fdb9374fb602881c513f3b Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Mon, 24 Jun 2024 09:24:54 +0000 Subject: [PATCH 09/16] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 08edc07..c87d415 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ It shall NOT be edited by hand. grocy is a web-based self-hosted groceries & household management solution for your home. -**Shipped version:** 4.2.0~ynh1 +**Shipped version:** 4.2.0~ynh2 **Demo:** diff --git a/README_es.md b/README_es.md index c8fd9e3..9d5cb40 100644 --- a/README_es.md +++ b/README_es.md @@ -18,7 +18,7 @@ No se debe editar a mano. grocy is a web-based self-hosted groceries & household management solution for your home. -**Versión actual:** 4.2.0~ynh1 +**Versión actual:** 4.2.0~ynh2 **Demo:** diff --git a/README_eu.md b/README_eu.md index a9093ce..4210421 100644 --- a/README_eu.md +++ b/README_eu.md @@ -18,7 +18,7 @@ EZ editatu eskuz. grocy is a web-based self-hosted groceries & household management solution for your home. -**Paketatutako bertsioa:** 4.2.0~ynh1 +**Paketatutako bertsioa:** 4.2.0~ynh2 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 84a357b..f55684e 100644 --- a/README_fr.md +++ b/README_fr.md @@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main. grocy is a web-based self-hosted groceries & household management solution for your home. -**Version incluse :** 4.2.0~ynh1 +**Version incluse :** 4.2.0~ynh2 **Démo :** diff --git a/README_gl.md b/README_gl.md index 7e3228f..5af3b5f 100644 --- a/README_gl.md +++ b/README_gl.md @@ -18,7 +18,7 @@ NON debe editarse manualmente. grocy is a web-based self-hosted groceries & household management solution for your home. -**Versión proporcionada:** 4.2.0~ynh1 +**Versión proporcionada:** 4.2.0~ynh2 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 417ad5c..656ba9a 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -18,7 +18,7 @@ grocy is a web-based self-hosted groceries & household management solution for your home. -**分发版本:** 4.2.0~ynh1 +**分发版本:** 4.2.0~ynh2 **演示:** From 4b25ff6efe332c56a6b586d8b8c5569b5c13a790 Mon Sep 17 00:00:00 2001 From: eric_G <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:25:39 +0200 Subject: [PATCH 10/16] Helpers 2.1 (#74) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update READMEs * cleaning * cleaning --------- Co-authored-by: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Co-authored-by: Félix Piédallu --- .gitignore | 3 ++ conf/extra_php-fpm.conf | 4 -- conf/nginx.conf | 2 +- manifest.toml | 5 ++- scripts/_common.sh | 14 +----- scripts/backup | 21 +++------ scripts/change_url | 14 ++---- scripts/config | 95 ----------------------------------------- scripts/install | 20 +++------ scripts/remove | 14 ++---- scripts/restore | 26 ++++------- scripts/upgrade | 28 +++++------- 12 files changed, 48 insertions(+), 198 deletions(-) create mode 100644 .gitignore delete mode 100644 conf/extra_php-fpm.conf delete mode 100644 scripts/config diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8f144f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +*.sw[op] +.DS_Store diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf deleted file mode 100644 index 700c37c..0000000 --- a/conf/extra_php-fpm.conf +++ /dev/null @@ -1,4 +0,0 @@ -; Additional php.ini defines, specific to this pool of workers. - -php_admin_value[upload_max_filesize] = 50M -php_admin_value[post_max_size] = 50M diff --git a/conf/nginx.conf b/conf/nginx.conf index edd843f..fa43cc4 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -12,7 +12,7 @@ location __PATH__/ { location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php/php__PHPVERSION__-fpm-__NAME__.sock; + fastcgi_pass unix:/var/run/php/php__PHP_VERSION__-fpm-__APP__.sock; fastcgi_index index.php; include fastcgi_params; include /etc/nginx/fastcgi_params; diff --git a/manifest.toml b/manifest.toml index 11b4d09..9e99fcc 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,8 @@ demo = "https://en.demo.grocy.info/stockoverview" code = "https://github.com/grocy/grocy" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.16" +helpers_version = "2.1" architectures = "all" multi_instance = true @@ -64,4 +65,4 @@ ram.runtime = "50M" api.protected = true [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" diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,17 +1,5 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index e2e0c78..7370029 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,36 +1,27 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - #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 -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf" #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index a4fcb69..39d37fc 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,25 +1,17 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/config b/scripts/config deleted file mode 100644 index 91c2de7..0000000 --- a/scripts/config +++ /dev/null @@ -1,95 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source _common.sh -source /usr/share/yunohost/helpers - -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) -current_fpm_footprint=$(ynh_app_setting_get --app=$app --key=fpm_footprint) - -#================================================= -# SPECIFIC GETTERS FOR TOML SHORT KEY -#================================================= - -get__fpm_footprint() { - # Free footprint value for php-fpm - # Check if current_fpm_footprint is an integer - if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null - then - echo "specific" - else - echo "$current_fpm_footprint" - fi -} - -get__free_footprint() { - # Free footprint value for php-fpm - # Check if current_fpm_footprint is an integer - if [ "$current_fpm_footprint" -eq "$current_fpm_footprint" ] 2> /dev/null - then - # If current_fpm_footprint is an integer, that's a numeric value for the footprint - echo "$current_fpm_footprint" - else - echo "0" - fi -} - -#================================================= -# SPECIFIC SETTERS FOR TOML SHORT KEYS -#================================================= - -set__fpm_footprint() { - if [ "$fpm_footprint" != "specific" ] - then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_footprint" - fi -} - -set__fpm_free_footprint() { - if [ "$fpm_footprint" = "specific" ] - then - ynh_app_setting_set --app=$app --key=fpm_footprint --value="$fpm_free_footprint" - fi -} - -#================================================= -# GENERIC FINALIZATION -#================================================= - -ynh_app_config_validate() { - _ynh_app_config_validate - - if [ "${changed[fpm_usage]}" == "true" ] || [ "${changed[fpm_footprint]}" == "true" ] || [ "${changed[fpm_free_footprint]}" == "true" ]; then - # If fpm_footprint is set to 'specific', use $fpm_free_footprint value. - if [ "$fpm_footprint" = "specific" ] - then - fpm_footprint=$fpm_free_footprint - fi - - if [ "$fpm_footprint" == "0" ] - then - ynh_print_err --message="When selecting 'specific', you have to set a footprint value into the field below." - - exit 0 - fi - fi -} - -ynh_app_config_apply() { - _ynh_app_config_apply - - ynh_add_fpm_config --phpversion=$phpversion --usage=$fpm_usage --footprint=$fpm_footprint -} - -ynh_app_config_run $1 diff --git a/scripts/install b/scripts/install index c8629ee..99920d9 100644 --- a/scripts/install +++ b/scripts/install @@ -1,18 +1,12 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=1 +ynh_script_progression "Setting up source files..." ynh_setup_source --dest_dir="$install_dir" @@ -22,18 +16,18 @@ chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=10 +ynh_script_progression "Configuring NGINX web server..." -ynh_add_nginx_config +ynh_config_add_nginx -ynh_add_fpm_config +ynh_config_add_phpfpm #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Adding a configuration file..." --weight=1 +ynh_script_progression "Adding $app's configuration..." -ynh_add_config --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" chown $app "$install_dir/data/config.php" @@ -42,4 +36,4 @@ chown $app "$install_dir/data/config.php" # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of $app completed" --last +ynh_script_progression "Installation of $app completed" diff --git a/scripts/remove b/scripts/remove index ac762c0..2528648 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,25 +1,19 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # REMOVE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1 +ynh_script_progression "Removing NGINX web server configuration..." -ynh_remove_nginx_config +ynh_config_remove_nginx -ynh_remove_fpm_config +ynh_config_remove_phpfpm #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of $app completed" --last +ynh_script_progression "Removal of $app completed" diff --git a/scripts/restore b/scripts/restore index 17456e3..0ffe5f2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - #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 @@ -13,9 +7,9 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring $app main directory..." --weight=5 +ynh_script_progression "Restoring $app main directory..." -ynh_restore_file --origin_path="$install_dir" +ynh_restore "$install_dir" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -23,24 +17,22 @@ chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE PHP-FPM CONFIGURATION #================================================= -ynh_script_progression --message="Restoring PHP-FPM configuration..." --weight=1 +ynh_script_progression "Restoring PHP-FPM configuration..." -ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf" +ynh_restore "/etc/php/$php_version/fpm/pool.d/$app.conf" -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM #================================================= -ynh_script_progression --message="Reloading NGINX web server and PHP-FPM..." --weight=1 +ynh_script_progression "Reloading NGINX web server and PHP-FPM..." -ynh_systemd_action --service_name=php$phpversion-fpm --action=reload -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=php$php_version-fpm --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for $app" --last +ynh_script_progression "Restoration completed for $app" diff --git a/scripts/upgrade b/scripts/upgrade index e0a2ebf..e29b34f 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,21 +1,16 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." --weight=5 +ynh_script_progression "Upgrading source files..." -ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="data" -ynh_secure_remove --file="$install_dir/data/viewcache/*" +ynh_setup_source --dest_dir="$install_dir" --keep="data" + +ynh_safe_rm "$install_dir/data/viewcache/*" chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" @@ -23,23 +18,22 @@ chown -R $app:www-data "$install_dir" #================================================= # NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1 +ynh_script_progression "Upgrading NGINX web server configuration..." -ynh_add_nginx_config +ynh_config_add_nginx -# Create a dedicated php-fpm config -ynh_add_fpm_config +ynh_config_add_phpfpm #================================================= # MODIFY A CONFIG FILE #================================================= -#ynh_add_config --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" -#chown $app "$install_dir/data/config.php" +chmod 400 "$install_dir/data/config.php" +chown $app "$install_dir/data/config.php" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of $app completed" --last +ynh_script_progression "Upgrade of $app completed" From 82b9ac281fc6c6f3dbbf29ab79f44052857b9ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 24 Jun 2024 11:25:59 +0200 Subject: [PATCH 11/16] Update tests.toml --- tests.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests.toml b/tests.toml index ded5f7f..94e1cf1 100644 --- a/tests.toml +++ b/tests.toml @@ -4,4 +4,4 @@ test_format = 1.0 exclude = ["install.subdir"] - test_upgrade_from.b9c2675f.name = "Upgrade from 3.2.0" + #test_upgrade_from.b9c2675f.name = "Upgrade from 3.2.0" From 6287da122933a6a5831ab7220036fac058d43eaf Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Mon, 24 Jun 2024 19:20:56 +0200 Subject: [PATCH 12/16] Delete config_panel.toml.example --- config_panel.toml.example | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 config_panel.toml.example diff --git a/config_panel.toml.example b/config_panel.toml.example deleted file mode 100644 index b90b6ef..0000000 --- a/config_panel.toml.example +++ /dev/null @@ -1,30 +0,0 @@ -version = "1.0" - -[main] -name = "Grocy configuration" - - [main.php_fpm_config] - name = "PHP-FPM configuration" - - [main.php_fpm_config.fpm_footprint] - ask = "Memory footprint" - type = "select" - choices.low = "Low, <= 20Mb per pool" - choices.medium = "Medium, between 20Mb and 40Mb per pool" - choices.high = "High, > 40Mb per pool" - choices.specific = "Use specific value" - default = "low" - - [main.php_fpm_config.fpm_free_footprint] - visible = "fpm_footprint == 'specific'" - ask = "Memory footprint of the service?" - type = "number" - default = "0" - help = "Free field to specify exactly the footprint in Mb if you don't want to use one of the three previous values." - - [main.php_fpm_config.fpm_usage] - ask = "Expected usage" - type = "select" - choices = ["low", "medium", "high"] - default = "low" - help = "low: Personal usage, behind the SSO. No RAM footprint when not used, but the impact on the processor can be high if many users are using the service.
medium: Low usage, few people or/and publicly accessible. Low RAM footprint, medium processor footprint when used.
high: High usage, frequently visited website. High RAM footprint, but lower on processor usage and quickly responding." From 874ade2dd27b75b97ab5e1c69021df57b190b130 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 25 Jun 2024 11:27:29 +0200 Subject: [PATCH 13/16] fix --- manifest.toml | 2 +- scripts/backup | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/manifest.toml b/manifest.toml index 9e99fcc..bd14f07 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ demo = "https://en.demo.grocy.info/stockoverview" code = "https://github.com/grocy/grocy" [integration] -yunohost = ">= 11.2.16" +yunohost = ">= 11.2.17" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/backup b/scripts/backup index 7370029..2f83233 100644 --- a/scripts/backup +++ b/scripts/backup @@ -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 From 3e1e8238ea15356e494fc1dcef015fef77135109 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 29 Jun 2024 20:09:28 +0200 Subject: [PATCH 14/16] Update POST_INSTALL.md: unecessary indent --- doc/POST_INSTALL.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md index 8ee478c..e11ecb2 100644 --- a/doc/POST_INSTALL.md +++ b/doc/POST_INSTALL.md @@ -1,6 +1,6 @@ Default login ``` - user: admin - password: admin +user: admin +password: admin ``` From 5c2c398d8abbc1abf5cb07f4cb975965a513b6dd Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Sat, 29 Jun 2024 18:09:32 +0000 Subject: [PATCH 15/16] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c87d415..7370df2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ It shall NOT be edited by hand. # Grocy for YunoHost -[![Integration level](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Working status](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![Integration level](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![Working status](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![Install Grocy with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) diff --git a/README_es.md b/README_es.md index 9d5cb40..8692bef 100644 --- a/README_es.md +++ b/README_es.md @@ -5,7 +5,7 @@ No se debe editar a mano. # Grocy para Yunohost -[![Nivel de integración](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![Instalar Grocy con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) diff --git a/README_eu.md b/README_eu.md index 4210421..a285d73 100644 --- a/README_eu.md +++ b/README_eu.md @@ -5,7 +5,7 @@ EZ editatu eskuz. # Grocy YunoHost-erako -[![Integrazio maila](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![Integrazio maila](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![Instalatu Grocy YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) diff --git a/README_fr.md b/README_fr.md index f55684e..a3b5010 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main. # Grocy pour YunoHost -[![Niveau d’intégration](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![Installer Grocy avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) diff --git a/README_gl.md b/README_gl.md index 5af3b5f..cc08a44 100644 --- a/README_gl.md +++ b/README_gl.md @@ -5,7 +5,7 @@ NON debe editarse manualmente. # Grocy para YunoHost -[![Nivel de integración](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![Nivel de integración](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![Instalar Grocy con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 656ba9a..fb52442 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -5,7 +5,7 @@ # YunoHost 上的 Grocy -[![集成程度](https://dash.yunohost.org/integration/grocy.svg)](https://dash.yunohost.org/appci/app/grocy) ![工作状态](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) +[![集成程度](https://dash.yunohost.org/integration/grocy.svg)](https://ci-apps.yunohost.org/ci/apps/grocy/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/grocy.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/grocy.maintain.svg) [![使用 YunoHost 安装 Grocy](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=grocy) From 4b89fffbd90abbc95aa379cca2ba6c5ea8140fb3 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 29 Jun 2024 20:09:42 +0200 Subject: [PATCH 16/16] Update POST_INSTALL_fr.md: unecessary indent --- doc/POST_INSTALL_fr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/POST_INSTALL_fr.md b/doc/POST_INSTALL_fr.md index df9d71f..dad4da6 100644 --- a/doc/POST_INSTALL_fr.md +++ b/doc/POST_INSTALL_fr.md @@ -1,5 +1,5 @@ Connexion par défaut ``` - utilisateur : admin - mot de passe : admin +utilisateur : admin +mot de passe : admin ```