diff --git a/README.md b/README.md index ca37b4a..26e1c15 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in Listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a PostgreSQL (⩾ v9.4) database as its data store. -**Shipped version:** 2.2.0~ynh2 +**Shipped version:** 2.3.0~ynh3 **Demo:** https://demo.listmonk.app/ diff --git a/README_fr.md b/README_fr.md index 5390846..01eee84 100644 --- a/README_fr.md +++ b/README_fr.md @@ -5,32 +5,32 @@ It shall NOT be edited by hand. # Listmonk pour YunoHost -[![Niveau d'intégration](https://dash.yunohost.org/integration/listmonk.svg)](https://dash.yunohost.org/appci/app/listmonk) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/listmonk.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/listmonk.maintain.svg) +[![Niveau d’intégration](https://dash.yunohost.org/integration/listmonk.svg)](https://dash.yunohost.org/appci/app/listmonk) ![Statut du fonctionnement](https://ci-apps.yunohost.org/ci/badges/listmonk.status.svg) ![Statut de maintenance](https://ci-apps.yunohost.org/ci/badges/listmonk.maintain.svg) [![Installer Listmonk avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=listmonk) *[Read this readme in english.](./README.md)* -> *Ce package vous permet d'installer Listmonk rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* +> *Ce package vous permet d’installer Listmonk rapidement et simplement sur un serveur YunoHost. +Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l’installer et en profiter.* -## Vue d'ensemble +## Vue d’ensemble Listmonk is a standalone, self-hosted, newsletter and mailing list manager. It is fast, feature-rich, and packed into a single binary. It uses a PostgreSQL (⩾ v9.4) database as its data store. -**Version incluse :** 2.2.0~ynh2 +**Version incluse :** 2.3.0~ynh3 **Démo :** https://demo.listmonk.app/ -## Captures d'écran +## Captures d’écran -![Capture d'écran de Listmonk](./doc/screenshots/screenshot.png) +![Capture d’écran de Listmonk](./doc/screenshots/screenshot.png) ## Documentations et ressources -* Site officiel de l'app : -* Documentation officielle de l'admin : -* Dépôt de code officiel de l'app : +* Site officiel de l’app : +* Documentation officielle de l’admin : +* Dépôt de code officiel de l’app : * Documentation YunoHost pour cette app : * Signaler un bug : @@ -46,4 +46,4 @@ ou sudo yunohost app upgrade listmonk -u https://github.com/YunoHost-Apps/listmonk_ynh/tree/testing --debug ``` -**Plus d'infos sur le packaging d'applications :** +**Plus d’infos sur le packaging d’applications :** \ No newline at end of file diff --git a/conf/systemd.service b/conf/systemd.service index 8d32c06..a5fcd31 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -1,7 +1,6 @@ [Unit] Description=Listmonk: newsletter and mailing list manager Documentation=https://listmonk.app/docs/ -After=network.target [Service] Type=simple @@ -11,35 +10,5 @@ WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/listmonk Restart=always -# Sandboxing options to harden security -# Depending on specificities of your service/app, you may need to tweak these -# .. but this should be a good baseline -# Details for these options: https://www.freedesktop.org/software/systemd/man/systemd.exec.html -NoNewPrivileges=yes -PrivateTmp=yes -PrivateDevices=yes -RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 -RestrictNamespaces=yes -RestrictRealtime=yes -DevicePolicy=closed -ProtectSystem=full -ProtectControlGroups=yes -ProtectKernelModules=yes -ProtectKernelTunables=yes -LockPersonality=yes -SystemCallFilter=~@clock @debug @module @mount @obsolete @reboot @setuid @swap - -# Denying access to capabilities that should not be relevant for webapps -# Doc: https://man7.org/linux/man-pages/man7/capabilities.7.html -CapabilityBoundingSet=~CAP_RAWIO CAP_MKNOD -CapabilityBoundingSet=~CAP_AUDIT_CONTROL CAP_AUDIT_READ CAP_AUDIT_WRITE -CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_TIME CAP_SYS_MODULE CAP_SYS_PACCT -CapabilityBoundingSet=~CAP_LEASE CAP_LINUX_IMMUTABLE CAP_IPC_LOCK -CapabilityBoundingSet=~CAP_BLOCK_SUSPEND CAP_WAKE_ALARM -CapabilityBoundingSet=~CAP_SYS_TTY_CONFIG -CapabilityBoundingSet=~CAP_MAC_ADMIN CAP_MAC_OVERRIDE -CapabilityBoundingSet=~CAP_NET_ADMIN CAP_NET_BROADCAST CAP_NET_RAW -CapabilityBoundingSet=~CAP_SYS_ADMIN CAP_SYS_PTRACE CAP_SYSLOG - [Install] WantedBy=multi-user.target diff --git a/manifest.json b/manifest.json index f512730..2ac0632 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Newsletter and mailing list manager", "fr": "Manager de newsletter et mailing list" }, - "version": "2.2.0~ynh2", + "version": "2.3.0~ynh3", "url": "https://listmonk.app/", "upstream": { "license": "AGPL-3.0-only", diff --git a/scripts/upgrade b/scripts/upgrade index 8f4f7e7..3e21ffd 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -78,6 +78,28 @@ if ! ynh_permission_exists --permission="api"; then ynh_permission_create --permission="api" --url="/api" --allowed="visitors" --show_tile="false" --protected="true" fi +if ynh_compare_current_package_version --comparison le --version 2.3.0~ynh3 +then + mkdir -p "$final_path/uploads" + + ynh_permission_delete --permission="admin" + ynh_permission_delete --permission="api" + + ynh_permission_create --permission="admin" --url="/admin" --additional_urls="/admin /api" --allowed=$admin --auth_header=false + ynh_permission_create --permission="api" --url="/public" --additional_urls="/api/public" --allowed="visitors" --show_tile="false" --protected="true" +fi + +if ynh_compare_current_package_version --comparison le --version 2.3.0~ynh1 +then + mkdir -p "$final_path/uploads" + + ynh_permission_delete --permission="admin" + ynh_permission_delete --permission="api" + + ynh_permission_create --permission="admin" --url="/admin" --additional_urls="/admin /api" --allowed=$admin --auth_header=false + ynh_permission_create --permission="api" --url="/public" --additional_urls="/api/public" --allowed="visitors" --show_tile="false" --protected="true" +fi + #================================================= # CREATE DEDICATED USER #=================================================