diff --git a/.gitignore b/.gitignore
index 91a6905..71a96db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
source/.buildpath
source/.gitignore
source/.project
+*~
+*.sw[op]
+.DS_Store
diff --git a/ALL_README.md b/ALL_README.md
index 152f2e7..e3c80d2 100644
--- a/ALL_README.md
+++ b/ALL_README.md
@@ -5,4 +5,6 @@
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md)
+- [Baca README dalam bahasa bahasa Indonesia](README_id.md)
+- [Прочитать README на русский](README_ru.md)
- [阅读中文(简体)的 README](README_zh_Hans.md)
diff --git a/README.md b/README.md
index db8219b..bc10de2 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ It shall NOT be edited by hand.
# Tiny Tiny RSS for YunoHost
-[![Integration level](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![Working status](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![Integration level](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Working status](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Maintenance status](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![Install Tiny Tiny RSS with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an
- flexible article filtering
-**Shipped version:** 20231202~ynh3
+**Shipped version:** 20240831~ynh2
**Demo:**
diff --git a/README_es.md b/README_es.md
index 7111ffd..08960e6 100644
--- a/README_es.md
+++ b/README_es.md
@@ -5,7 +5,7 @@ No se debe editar a mano.
# Tiny Tiny RSS para Yunohost
-[![Nivel de integración](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![Nivel de integración](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Estado funcional](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Estado En Mantención](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![Instalar Tiny Tiny RSS con Yunhost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an
- flexible article filtering
-**Versión actual:** 20231202~ynh3
+**Versión actual:** 20240831~ynh2
**Demo:**
diff --git a/README_eu.md b/README_eu.md
index ceb028b..0597b7b 100644
--- a/README_eu.md
+++ b/README_eu.md
@@ -5,7 +5,7 @@ EZ editatu eskuz.
# Tiny Tiny RSS YunoHost-erako
-[![Integrazio maila](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![Integrazio maila](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![Instalatu Tiny Tiny RSS YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an
- flexible article filtering
-**Paketatutako bertsioa:** 20231202~ynh3
+**Paketatutako bertsioa:** 20240831~ynh2
**Demoa:**
diff --git a/README_fr.md b/README_fr.md
index f78c223..f63a30a 100644
--- a/README_fr.md
+++ b/README_fr.md
@@ -5,7 +5,7 @@ Il NE doit PAS être modifié à la main.
# Tiny Tiny RSS pour YunoHost
-[![Niveau d’intégration](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![Niveau d’intégration](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![Installer Tiny Tiny RSS avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS est un lecteur et agrégateur de flux de nouvelles (RSS/Atom) bas
- filtrage flexible des articles
-**Version incluse :** 20231202~ynh3
+**Version incluse :** 20240831~ynh2
**Démo :**
diff --git a/README_gl.md b/README_gl.md
index 623f53c..cc8c1b0 100644
--- a/README_gl.md
+++ b/README_gl.md
@@ -5,7 +5,7 @@ NON debe editarse manualmente.
# Tiny Tiny RSS para YunoHost
-[![Nivel de integración](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![Nivel de integración](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Estado de funcionamento](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Estado de mantemento](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![Instalar Tiny Tiny RSS con YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an
- flexible article filtering
-**Versión proporcionada:** 20231202~ynh3
+**Versión proporcionada:** 20240831~ynh2
**Demo:**
diff --git a/README_id.md b/README_id.md
new file mode 100644
index 0000000..283ec73
--- /dev/null
+++ b/README_id.md
@@ -0,0 +1,59 @@
+
+
+# Tiny Tiny RSS untuk YunoHost
+
+[![Tingkat integrasi](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Status kerja](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Status pemeliharaan](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+
+[![Pasang Tiny Tiny RSS dengan YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
+
+*[Baca README ini dengan bahasa yang lain.](./ALL_README.md)*
+
+> *Paket ini memperbolehkan Anda untuk memasang Tiny Tiny RSS secara cepat dan mudah pada server YunoHost.*
+> *Bila Anda tidak mempunyai YunoHost, silakan berkonsultasi dengan [panduan](https://yunohost.org/install) untuk mempelajari bagaimana untuk memasangnya.*
+
+## Ringkasan
+
+Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader and aggregator.
+
+### Features
+
+- feed aggregation/syndication,
+- OPML import/export,
+- multiple ways to share stuff: export RSS feeds, plugins for various social sites, sharing by URL, etc,
+- Plugins and themes,
+- podcasts,
+- flexible article filtering
+
+
+**Versi terkirim:** 20240831~ynh2
+
+**Demo:**
+
+## Tangkapan Layar
+
+![Tangkapan Layar pada Tiny Tiny RSS](./doc/screenshots/screenshot.png)
+
+## Dokumentasi dan sumber daya
+
+- Website aplikasi resmi:
+- Dokumentasi admin resmi:
+- Depot kode aplikasi hulu:
+- Gudang YunoHost:
+- Laporkan bug:
+
+## Info developer
+
+Silakan kirim pull request ke [`testing` branch](https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing).
+
+Untuk mencoba branch `testing`, silakan dilanjutkan seperti:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing --debug
+atau
+sudo yunohost app upgrade ttrss -u https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing --debug
+```
+
+**Info lebih lanjut mengenai pemaketan aplikasi:**
diff --git a/README_ru.md b/README_ru.md
new file mode 100644
index 0000000..ccd3b5b
--- /dev/null
+++ b/README_ru.md
@@ -0,0 +1,59 @@
+
+
+# Tiny Tiny RSS для YunoHost
+
+[![Уровень интеграции](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![Состояние работы](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![Состояние сопровождения](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+
+[![Установите Tiny Tiny RSS с YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
+
+*[Прочтите этот README на других языках.](./ALL_README.md)*
+
+> *Этот пакет позволяет Вам установить Tiny Tiny RSS быстро и просто на YunoHost-сервер.*
+> *Если у Вас нет YunoHost, пожалуйста, посмотрите [инструкцию](https://yunohost.org/install), чтобы узнать, как установить его.*
+
+## Обзор
+
+Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader and aggregator.
+
+### Features
+
+- feed aggregation/syndication,
+- OPML import/export,
+- multiple ways to share stuff: export RSS feeds, plugins for various social sites, sharing by URL, etc,
+- Plugins and themes,
+- podcasts,
+- flexible article filtering
+
+
+**Поставляемая версия:** 20240831~ynh2
+
+**Демо-версия:**
+
+## Снимки экрана
+
+![Снимок экрана Tiny Tiny RSS](./doc/screenshots/screenshot.png)
+
+## Документация и ресурсы
+
+- Официальный веб-сайт приложения:
+- Официальная документация администратора:
+- Репозиторий кода главной ветки приложения:
+- Магазин YunoHost:
+- Сообщите об ошибке:
+
+## Информация для разработчиков
+
+Пришлите Ваш запрос на слияние в [ветку `testing`](https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing).
+
+Чтобы попробовать ветку `testing`, пожалуйста, сделайте что-то вроде этого:
+
+```bash
+sudo yunohost app install https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing --debug
+или
+sudo yunohost app upgrade ttrss -u https://github.com/YunoHost-Apps/ttrss_ynh/tree/testing --debug
+```
+
+**Больше информации о пакетировании приложений:**
diff --git a/README_zh_Hans.md b/README_zh_Hans.md
index 1e8a527..67eca3d 100644
--- a/README_zh_Hans.md
+++ b/README_zh_Hans.md
@@ -5,7 +5,7 @@
# YunoHost 上的 Tiny Tiny RSS
-[![集成程度](https://dash.yunohost.org/integration/ttrss.svg)](https://dash.yunohost.org/appci/app/ttrss) ![工作状态](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
+[![集成程度](https://dash.yunohost.org/integration/ttrss.svg)](https://ci-apps.yunohost.org/ci/apps/ttrss/) ![工作状态](https://ci-apps.yunohost.org/ci/badges/ttrss.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/ttrss.maintain.svg)
[![使用 YunoHost 安装 Tiny Tiny RSS](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=ttrss)
@@ -28,7 +28,7 @@ Tiny Tiny RSS is a free and open source web-based news feed (RSS/Atom) reader an
- flexible article filtering
-**分发版本:** 20231202~ynh3
+**分发版本:** 20240831~ynh2
**演示:**
diff --git a/conf/config.php b/conf/config.php
index c5a1ade..3fedbdd 100644
--- a/conf/config.php
+++ b/conf/config.php
@@ -39,7 +39,7 @@
// *** Files and directories ***
// *****************************
- putenv('TTRSS_PHP_EXECUTABLE=/usr/bin/php__PHPVERSION__');
+ putenv('TTRSS_PHP_EXECUTABLE=/usr/bin/php__PHP_VERSION__');
// Path to PHP *COMMAND LINE* executable, used for various command-line tt-rss
// programs and update daemon. Do not try to use CGI binary here, it won't work.
// If you see HTTP headers being displayed while running tt-rss scripts,
diff --git a/conf/extra_php-fpm.conf b/conf/extra_php-fpm.conf
deleted file mode 100644
index 940d2b8..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] = 10M
-php_admin_value[post_max_size] = 10M
diff --git a/conf/nginx.conf b/conf/nginx.conf
index 06828a7..6996f17 100644
--- a/conf/nginx.conf
+++ b/conf/nginx.conf
@@ -12,7 +12,7 @@ location __PATH__/ {
try_files $uri $uri/ index.php;
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;
diff --git a/conf/systemd.service b/conf/systemd.service
index 8c3091b..f6cd71d 100644
--- a/conf/systemd.service
+++ b/conf/systemd.service
@@ -8,7 +8,7 @@ Type=simple
User=__APP__
Group=__APP__
WorkingDirectory=__INSTALL_DIR__/
-ExecStart=/usr/bin/php__PHPVERSION__ __INSTALL_DIR__/update_daemon2.php
+ExecStart=/usr/bin/php__PHP_VERSION__ __INSTALL_DIR__/update_daemon2.php
Restart=always
RestartSec=10
diff --git a/config_panel.toml.example b/config_panel.toml.example
deleted file mode 100644
index 5c83f11..0000000
--- a/config_panel.toml.example
+++ /dev/null
@@ -1,30 +0,0 @@
-version = "1.0"
-
-[main]
-name = "TTRSS 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."
diff --git a/manifest.toml b/manifest.toml
index afc1f30..5b58a04 100644
--- a/manifest.toml
+++ b/manifest.toml
@@ -5,7 +5,7 @@ name = "Tiny Tiny RSS"
description.en = "News feed (RSS/Atom) reader and aggregator"
description.fr = "Lecteur de flux d’actualité utilisant les protocoles RSS et Atom"
-version = "20231202~ynh3"
+version = "20240831~ynh2"
maintainers = []
@@ -17,7 +17,8 @@ admindoc = "https://tt-rss.org/wiki.php"
code = "https://gitlab.tt-rss.org/tt-rss/tt-rss"
[integration]
-yunohost = ">= 11.2"
+yunohost = ">= 11.2.30"
+helpers_version = "2.1"
architectures = "all"
multi_instance = true
@@ -43,14 +44,15 @@ ram.runtime = "50M"
[resources]
[resources.sources.main]
- url = "https://gitlab.tt-rss.org/tt-rss/tt-rss/-/archive/2b8e34453234b8b31ebc9e7020f8677bf3889898.tar.gz"
- sha256 = "72ec560bd5ad7bac4789d7af0e5c2d7c1c394e9c540d46d5421ecae219d8f875"
+ url = "https://gitlab.tt-rss.org/tt-rss/tt-rss/-/archive/d5d47b8e500542fc4b6f89ef11bef3ceae833063.tar.gz"
+ sha256 = "72e13a9e1b568055c9c6d072d8ec5b87d670af59e63f6202cfad1fe333b15866"
autoupdate.strategy = "latest_gitlab_commit"
[resources.system_user]
allow_email = true
[resources.install_dir]
+ group = "www-data:r-x"
[resources.permissions]
main.url = "/"
@@ -67,7 +69,7 @@ ram.runtime = "50M"
api.allowed = "visitors"
[resources.apt]
- packages = "postgresql, php8.2-pgsql, php8.2-curl, php8.2-gd, php8.2-opcache, php8.2-fileinfo, php8.2-intl, php8.2-cli, php8.2-mbstring, php8.2-xml"
+ packages = "postgresql, php8.3-pgsql, php8.3-curl, php8.3-gd, php8.3-opcache, php8.3-fileinfo, php8.3-intl, php8.3-cli, php8.3-mbstring, php8.3-xml"
[resources.database]
type = "postgresql"
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 722244d..3dd4c55 100644
--- a/scripts/backup
+++ b/scripts/backup
@@ -1,53 +1,35 @@
#!/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"
-#=================================================
-# BACKUP THE PHP-FPM CONFIGURATION
-#=================================================
+ynh_backup "/etc/php/$php_version/fpm/pool.d/$app.conf"
-ynh_backup --src_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
-
-#=================================================
-# BACKUP SYSTEMD
-#=================================================
-
-ynh_backup --src_path="/etc/systemd/system/$app.service"
+ynh_backup "/etc/systemd/system/$app.service"
#=================================================
# BACKUP THE POSTGRESQL DATABASE
#=================================================
-ynh_print_info --message="Backing up the PostgreSQL database..."
+ynh_print_info "Backing up the PostgreSQL database..."
-ynh_psql_dump_db --database="$db_name" > db.sql
+ynh_psql_dump_db > db.sql
#=================================================
# 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 134002f..0cba764 100644
--- a/scripts/change_url
+++ b/scripts/change_url
@@ -1,53 +1,40 @@
#!/bin/bash
-#=================================================
-# GENERIC STARTING
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# STANDARD MODIFICATIONS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Stopping a systemd service..." --weight=1
+ynh_script_progression "Stopping $app's systemd service..."
-ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
+ynh_systemctl --service=$app --action="stop" --log_path="systemd"
#=================================================
# MODIFY URL IN NGINX CONF
#=================================================
-ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2
+ynh_script_progression "Updating NGINX web server configuration..."
-ynh_change_url_nginx_config
+ynh_config_change_url_nginx
-#=================================================
-# SPECIFIC MODIFICATIONS
#=================================================
# UPDATE A CONFIG FILE
#=================================================
-ynh_script_progression --message="Updating a configuration file..." --weight=1
+ynh_script_progression "Updating configuration..."
domain="$new_domain"
path="$new_path"
-ynh_add_config --template="config.php" --destination="$install_dir/config.php"
-
-chmod 400 "$install_dir/config.php"
-chown $app "$install_dir/config.php"
+ynh_config_add --template="config.php" --destination="$install_dir/config.php"
#=================================================
# START SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Starting a systemd service..."
+ynh_script_progression "Starting $app's systemd service..."
-ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
+ynh_systemctl --service=$app --action="start" --log_path="systemd"
#=================================================
# 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 a829923..0000000
--- a/scripts/config
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-#=================================================
-# GENERIC STARTING
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
-source _common.sh
-source /usr/share/yunohost/helpers
-
-#=================================================
-# 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 348a544..18d0db4 100644
--- a/scripts/install
+++ b/scripts/install
@@ -1,74 +1,57 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
source _common.sh
source /usr/share/yunohost/helpers
+ynh_app_setting_set --key=php_upload_max_filesize --value=10M
+
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
-ynh_script_progression --message="Setting up source files..." --weight=7
+ynh_script_progression "Setting up source files..."
-# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir"
-echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
-chmod -R o-rwx "$install_dir"
-chown -R $app:www-data "$install_dir"
+echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
#=================================================
# SYSTEM CONFIGURATION
#=================================================
-ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
+ynh_script_progression "Adding system configurations related to $app..."
-# Create a dedicated PHP-FPM config
-ynh_add_fpm_config
+ynh_config_add_phpfpm
-# Create a dedicated NGINX config
-ynh_add_nginx_config
+ynh_config_add_nginx
-# Create a dedicated systemd config
-ynh_add_systemd_config
+ynh_config_add_systemd
yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log"
-#=================================================
-# SPECIFIC SETUP
#=================================================
# ADD A CONFIGURATION
#=================================================
-ynh_script_progression --message="Adding a configuration file..." --weight=1
+ynh_script_progression "Adding $app's configuration..."
-ynh_add_config --template="config.php" --destination="$install_dir/config.php"
-
-chmod 400 "$install_dir/config.php"
-chown $app "$install_dir/config.php"
+ynh_config_add --template="config.php" --destination="$install_dir/config.php"
#=================================================
# INITIALIZE DATABASE
#=================================================
-ynh_script_progression --message="Initializing database..." --weight=6
+ynh_script_progression "Initializing database..."
-ynh_psql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name" \
- < "$install_dir/schema/ttrss_schema_pgsql.sql"
+ynh_psql_db_shell < "$install_dir/schema/ttrss_schema_pgsql.sql"
-ynh_exec_as $app php$phpversion $install_dir/update.php --update-schema=force-yes
+ynh_exec_as_app php$php_version $install_dir/update.php --update-schema=force-yes
#=================================================
# START SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Starting a systemd service..." --weight=1
+ynh_script_progression "Starting $app's systemd service..."
-# Start a systemd service
-ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
+ynh_systemctl --service=$app --action="start" --log_path="systemd"
#=================================================
# 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 9487cb3..70f5dfd 100644
--- a/scripts/remove
+++ b/scripts/remove
@@ -1,39 +1,27 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
-# REMOVE SYSTEMD SERVICE
-#=================================================
-ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
+ynh_script_progression "Removing system configurations related to $app..."
-# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
-if ynh_exec_warn_less yunohost service status $app >/dev/null
+if ynh_hide_warnings yunohost service status $app >/dev/null
then
- ynh_script_progression --message="Removing $app service integration..."
+ ynh_script_progression "Removing $app service integration..."
yunohost service remove $app
fi
-# Remove the dedicated systemd config
-ynh_remove_systemd_config
+ynh_config_remove_systemd
-# Remove the dedicated NGINX config
-ynh_remove_nginx_config
+ynh_config_remove_nginx
-# Remove the dedicated PHP-FPM config
-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 35a82eb..63f89b3 100644
--- a/scripts/restore
+++ b/scripts/restore
@@ -1,42 +1,32 @@
#!/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
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
-ynh_script_progression --message="Restoring the app main directory..." --weight=2
+ynh_script_progression "Restoring the app main directory..."
-ynh_restore_file --origin_path="$install_dir"
-
-chmod -R o-rwx "$install_dir"
-chown -R $app:www-data "$install_dir"
+ynh_restore "$install_dir"
#=================================================
# RESTORE THE POSTGRESQL DATABASE
#=================================================
-ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6
+ynh_script_progression "Restoring the PostgreSQL database..."
-ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
+ynh_psql_db_shell < ./db.sql
#=================================================
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
-ynh_script_progression --message="Restoring system configurations related to $app..." --weight=5
+ynh_script_progression "Restoring system configurations related to $app..."
-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"
-ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
+ynh_restore "/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log"
@@ -44,15 +34,15 @@ yunohost service add $app --description="News feed reader and aggregator" --log=
#=================================================
# START SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Starting a systemd service..."
+ynh_script_progression "Starting $app's systemd service..."
-ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
+ynh_systemctl --service=$app --action="start" --log_path="systemd"
+ynh_systemctl --service=php$php_version-fpm --action=reload
-ynh_systemd_action --service_name=php$phpversion-fpm --action=reload
-ynh_systemd_action --service_name=nginx --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 3d6e3e3..5297295 100644
--- a/scripts/upgrade
+++ b/scripts/upgrade
@@ -1,99 +1,64 @@
#!/bin/bash
-#=================================================
-# GENERIC START
-#=================================================
-# IMPORT GENERIC HELPERS
-#=================================================
-
source _common.sh
source /usr/share/yunohost/helpers
-#=================================================
-# CHECK VERSION
-#=================================================
+ynh_app_setting_set_default --key=php_upload_max_filesize --value=10M
-upgrade_type=$(ynh_check_app_version_changed)
-
-#=================================================
-# STANDARD UPGRADE STEPS
#=================================================
# STOP SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Stopping a systemd service..."
+ynh_script_progression "Stopping $app's systemd service..."
-ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
+ynh_systemctl --service=$app --action="stop" --log_path="systemd"
#=================================================
# ENSURE DOWNWARD COMPATIBILITY
#=================================================
-ynh_script_progression --message="Ensuring downward compatibility..." --weight=2
+ynh_script_progression "Ensuring downward compatibility..."
-# Do not remove the file before the backup, to not fail the backup.
-# Remove old cron job
-ynh_secure_remove --file="/etc/cron.d/$app"
+ynh_safe_rm "/etc/cron.d/$app"
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================
+ynh_script_progression "Upgrading source files..."
-if [ "$upgrade_type" == "UPGRADE_APP" ]
-then
- ynh_script_progression --message="Upgrading source files..." --weight=1
+ynh_setup_source --dest_dir="$install_dir"
- # Download, check integrity, uncompress and patch the source from app.src
- ynh_setup_source --dest_dir="$install_dir"
- echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
-fi
-
-chmod -R o-rwx "$install_dir"
-chown -R $app:www-data "$install_dir"
+echo "$(ynh_app_upstream_version)" > "$install_dir/version_static.txt"
#=================================================
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
-ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
+ynh_script_progression "Upgrading system configurations related to $app..."
-# Create a dedicated PHP-FPM config
-ynh_add_fpm_config
+ynh_config_add_phpfpm
-# Create a dedicated NGINX config
-ynh_add_nginx_config
+ynh_config_add_nginx
-# Create a dedicated systemd config
-ynh_add_systemd_config
+ynh_config_add_systemd
yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log"
-#=================================================
-# SPECIFIC UPGRADE
#=================================================
# UPDATE A CONFIG FILE
#=================================================
+ynh_script_progression "Updating configuration..."
-if [ "$upgrade_type" == "UPGRADE_APP" ]
-then
- ynh_script_progression --message="Updating a configuration file..." --weight=2
+ynh_config_add --template="config.php" --destination="$install_dir/config.php"
- ynh_add_config --template="config.php" --destination="$install_dir/config.php"
-
- ynh_script_progression --message="Upgrading the database..." --weight=2
-
- ynh_exec_as $app php$phpversion $install_dir/update.php --update-schema=force-yes
-fi
-
-chmod 400 "$install_dir/config.php"
-chown $app:$app "$install_dir/config.php"
+ynh_exec_as_app php$php_version $install_dir/update.php --update-schema=force-yes
#=================================================
# START SYSTEMD SERVICE
#=================================================
-ynh_script_progression --message="Starting a systemd service..." --weight=1
+ynh_script_progression "Starting $app's systemd service..."
-ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
+ynh_systemctl --service=$app --action="start" --log_path="systemd"
#=================================================
# END OF SCRIPT
#=================================================
-ynh_script_progression --message="Upgrade of $app completed" --last
+ynh_script_progression "Upgrade of $app completed"