diff --git a/ALL_README.md b/ALL_README.md index 8938aae..152f2e7 100644 --- a/ALL_README.md +++ b/ALL_README.md @@ -1,7 +1,7 @@ # All available README files by language - [Read the README in English](README.md) -- [Lee el README en español](README_es.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) diff --git a/README.md b/README.md index 9a0b9ff..61a2072 100644 --- a/README.md +++ b/README.md @@ -16,61 +16,29 @@ It shall NOT be edited by hand. ## Overview -Electronic mailing lists manager - -**Shipped version:** 1.0~ynh2 - -**Demo:** - -## Screenshots - -![Screenshot of Mailman3](./doc/screenshots/screenshot1.webp) - -## Disclaimers / important information - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**Shipped version:** 3.3~ynh1 + +**Demo:** + +## Screenshots + +![Screenshot of Mailman3](./doc/screenshots/screenshot1.webp) + ## Documentation and resources - Official app website: diff --git a/README_es.md b/README_es.md index b32d141..a461b0e 100644 --- a/README_es.md +++ b/README_es.md @@ -16,61 +16,29 @@ No se debe editar a mano. ## Descripción general - - -**Versión actual:** 1.0~ynh2 - -**Demo:** - -## Capturas - -![Captura de Mailman3](./doc/screenshots/screenshot1.webp) - -## informaciones importantes - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**Versión actual:** 3.3~ynh1 + +**Demo:** + +## Capturas + +![Captura de Mailman3](./doc/screenshots/screenshot1.webp) + ## Documentaciones y recursos - Sitio web oficial: diff --git a/README_eu.md b/README_eu.md index e2b8c9a..0d60354 100644 --- a/README_eu.md +++ b/README_eu.md @@ -16,61 +16,29 @@ EZ editatu eskuz. ## Aurreikuspena - - -**Paketatutako bertsioa:** 1.0~ynh2 - -**Demoa:** - -## Pantaila-argazkiak - -![Mailman3(r)en pantaila-argazkia](./doc/screenshots/screenshot1.webp) - -## Ezespena / informazio garrantzitsua - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**Paketatutako bertsioa:** 3.3~ynh1 + +**Demoa:** + +## Pantaila-argazkiak + +![Mailman3(r)en pantaila-argazkia](./doc/screenshots/screenshot1.webp) + ## Dokumentazioa eta baliabideak - Aplikazioaren webgune ofiziala: diff --git a/README_fr.md b/README_fr.md index 7cc292b..8f84515 100644 --- a/README_fr.md +++ b/README_fr.md @@ -16,61 +16,29 @@ Il NE doit PAS être modifié à la main. ## Vue d’ensemble -Un gestionnaire de liste de discussion par email - -**Version incluse :** 1.0~ynh2 - -**Démo :** - -## Captures d’écran - -![Capture d’écran de Mailman3](./doc/screenshots/screenshot1.webp) - -## Avertissements / informations importantes - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**Version incluse :** 3.3~ynh1 + +**Démo :** + +## Captures d’écran + +![Capture d’écran de Mailman3](./doc/screenshots/screenshot1.webp) + ## Documentations et ressources - Site officiel de l’app : diff --git a/README_gl.md b/README_gl.md index 64f3ce3..0eabc58 100644 --- a/README_gl.md +++ b/README_gl.md @@ -16,61 +16,29 @@ NON debe editarse manualmente. ## Vista xeral - - -**Versión proporcionada:** 1.0~ynh2 - -**Demo:** - -## Capturas de pantalla - -![Captura de pantalla de Mailman3](./doc/screenshots/screenshot1.webp) - -## Avisos / información importante - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**Versión proporcionada:** 3.3~ynh1 + +**Demo:** + +## Capturas de pantalla + +![Captura de pantalla de Mailman3](./doc/screenshots/screenshot1.webp) + ## Documentación e recursos - Web oficial da app: diff --git a/README_zh_Hans.md b/README_zh_Hans.md index 2d7b30c..2a245cc 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -16,61 +16,29 @@ ## 概况 - - -**分发版本:** 1.0~ynh2 - -**演示:** - -## 截图 - -![Mailman3 的截图](./doc/screenshots/screenshot1.webp) - -## 免责声明 / 重要信息 - -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? ## Limitations * Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). * You must have a HTTPS certificate installed on the root domain. * There may be only one installation per YunoHost. + +**分发版本:** 3.3~ynh1 + +**演示:** + +## 截图 + +![Mailman3 的截图](./doc/screenshots/screenshot1.webp) + ## 文档与资源 - 官方应用网站: diff --git a/check_process b/check_process deleted file mode 100644 index 9a38718..0000000 --- a/check_process +++ /dev/null @@ -1,22 +0,0 @@ -;; Test complet - ; Manifest - domain="domain.tld" - is_public=1 - ; Checks - pkg_linter=1 - setup_sub_dir=0 - setup_root=1 - setup_nourl=0 - setup_private=1 - setup_public=1 - upgrade=1 - backup_restore=1 - multi_instance=0 - port_already_use=1 - change_url=0 -;;; Options -Email= -Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. diff --git a/doc/ADMIN.md b/doc/ADMIN.md new file mode 100644 index 0000000..496accf --- /dev/null +++ b/doc/ADMIN.md @@ -0,0 +1,25 @@ +## Mailman admin panels + +Classical admin is available on the page: + +Django admin on: + +## General Configuration + +Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: + +> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite + +On your YunoHost, all the configuration files you need to worry about are in: + +* `/etc/mailman3/` +* `/usr/share/mailman3-web/` + +The services you need to manage can be checked with: + +* `systemctl status mailman3` +* `systemctl status mailman3-web` + +It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. + +Finally, you also configure things through the Django web admin available at `/admin/`. diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..3b649f0 --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,13 @@ +* Users can just sign up themselves to manage details +* Users can use mailing lists without signing up? + +## Limitations + +* Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and + which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). + +* Mailman3 must be configured to use a root domain (https://myyunohost.org and *not* https://myyunohost.org/mailman3). + +* You must have a HTTPS certificate installed on the root domain. + +* There may be only one installation per YunoHost. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md deleted file mode 100644 index b1cacf5..0000000 --- a/doc/DISCLAIMER.md +++ /dev/null @@ -1,42 +0,0 @@ -* Any known limitations, constrains or stuff not working, such as (but not limited to): - * requiring a full dedicated domain - -* Other infos that people should be aware of, such as: - * No LDAP support yet (apparently under development) - * Users can also just sign up themselves to manage details - * Users can use mailing lists without signing up? - -Classical admin is available on the page: https://myyunohost.org/ - -Django admin on: https://myyunohost.org/admin/ - -## General Configuration - -Mailman 3 or "The Mailman Suite" is made up of 5 moving parts. See the following documentation for more: - -> http://docs.mailman3.org/en/latest/index.html#the-mailman-suite - -On your YunoHost, all the configuration files you need to worry about are in: - -* `/etc/mailman3/` -* `/usr/share/mailman3-web/` - -The services you need to manage can be checked with: - -* `systemctl status mailman3` -* `systemctl status mailman3-web` - -It is important to note that this package makes use of the [mailman3-full](http://docs.mailman3.org/en/latest/prodsetup.html#distribution-packages) Debian package contained in the Debian Stretch backports repository. The default installation assumes the use of a SQLite3 database but the installation script overrides this and uses a PostgreSQL database instead. - -Finally, you also configure things through the Django web admin available at `/admin/`. - -## Limitations - -* Migrating from Mailman 2.X is not officially supported, sorry. However, there is a manual and - which details an experimental process. Please see [the documentation](https://docs.mailman3.org/en/latest/migration.html). - -* Mailman3 must be configured to use a root domain (https://myyunohost.org and not https://myyunohost.org/mailman3). - -* You must have a HTTPS certificate installed on the root domain. - -* There may be only one installation per YunoHost. diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 72ca265..0000000 --- a/manifest.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "Mailman3", - "id": "mailman3", - "packaging_format": 1, - "description": { - "en": "Electronic mailing lists manager", - "fr": "Un gestionnaire de liste de discussion par email" - }, - "version": "1.0~ynh2", - "url": "http://www.list.org/", - "upstream": { - "license": "AGPL-3.0-or-later", - "website": "http://www.list.org/", - "demo": "https://lists.mailman3.org/mailman3/lists/", - "admindoc": "https://docs.mailman3.org/en/latest/", - "userdoc": "http://docs.mailman3.org/en/latest/userguide.html", - "code": "https://gitlab.com/mailman/mailman-suite" - }, - "license": "AGPL-3.0-or-later", - "maintainer": { - "name": "decentral1se", - "email": "lukewm@riseup.net", - "url": "https://decentral1.se/" - }, - "requirements": { - "yunohost": ">= 4.3.0" - }, - "multi_instance": false, - "services": [ - "nginx" - ], - "arguments": { - "install" : [ - { - "name": "domain", - "type": "domain" - }, - { - "name": "is_public", - "type": "boolean", - "default": true - }, - { - "name": "admin", - "type": "user" - }, - { - "name": "password", - "type": "password" - } - ] - } -} diff --git a/manifest.toml b/manifest.toml new file mode 100644 index 0000000..88e0f62 --- /dev/null +++ b/manifest.toml @@ -0,0 +1,64 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/manifest.v2.schema.json + +packaging_format = 2 + +id = "mailman3" +name = "Mailman3" +description.en = "Electronic mailing lists manager" +description.fr = "Un gestionnaire de liste de discussion par email" + +version = "3.3~ynh1" + +maintainers = ["decentral1se"] + +[upstream] +license = "AGPL-3.0-or-later" +website = "http://www.list.org/" +demo = "https://lists.mailman3.org/mailman3/lists/" +admindoc = "https://docs.mailman3.org/en/latest/" +userdoc = "http://docs.mailman3.org/en/latest/userguide.html" +code = "https://gitlab.com/mailman/mailman-suite" +cpe = "cpe:2.3:a:gnu:mailman" +fund = "https://my.fsf.org/civicrm/contribute/transact?reset=1&id=22" + +[integration] +yunohost = ">=11.2" +architectures = "all" +multi_instance = false +ldap = false +sso = false +disk = "50M" # FIXME: replace with an **estimate** minimum disk requirement. e.g. 20M, 400M, 1G, ... +ram.build = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... +ram.runtime = "50M" # FIXME: replace with an **estimate** minimum ram requirement. e.g. 50M, 400M, 1G, ... + +[install] + [install.domain] + type = "domain" + + [install.init_main_permission] + type = "group" + default = "visitors" + + [install.admin] + type = "user" + + [install.password] + type = "password" + +[resources] + [resources.system_user] + + [resources.install_dir] + + [resources.permissions] + main.url = "/" + + [resources.ports] + main.default = 8095 + + [resources.apt] + packages = ["postgresql", "lynx", "mailman3-full"] + + # Can' use resource helper because we need 2 dbs with specific names… + # [resources.database] + # type = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index f8851af..944a65e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -4,9 +4,6 @@ # COMMON VARIABLES #================================================= -# dependencies used by the app -pkg_dependencies="postgresql lynx mailman3-full" - #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/backup b/scripts/backup index 6034411..3883acc 100755 --- a/scripts/backup +++ b/scripts/backup @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,40 +8,17 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - true -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -db_name_app=$(ynh_app_setting_get --app=$app --key=db_name_app) -db_name_web=$(ynh_app_setting_get --app=$app --key=db_name_web) - #================================================= # DECLARE DATA AND CONF FILES TO BACKUP #================================================= ynh_print_info --message="Declaring files to be backed up..." #================================================= -# BACKUP THE NGINX CONFIGURATION +# SYSTEM CONFIGURATION #================================================= ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# SPECIFIC BACKUP #================================================= # BACKUP VARIOUS FILES #================================================= diff --git a/scripts/install b/scripts/install index 9635462..2cbb984 100755 --- a/scripts/install +++ b/scripts/install @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,128 +8,70 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# MANAGE SCRIPT FAILURE +# INITIALIZE AND STORE SETTINGS #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS FROM THE MANIFEST -#================================================= - -domain=$YNH_APP_ARG_DOMAIN -path_url="/" -is_public=$YNH_APP_ARG_IS_PUBLIC -admin=$YNH_APP_ARG_ADMIN -password=$YNH_APP_ARG_PASSWORD - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS -#================================================= -ynh_script_progression --message="Validating installation parameters..." - -test ! -e /usr/share/$app-web || ynh_die --message="Mailman3 is already installed!" - -test ! -e /etc/$app || ynh_die --message="Mailman3 is already installed!" - -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - -#================================================= -# STORE SETTINGS FROM MANIFEST -#================================================= -ynh_script_progression --message="Storing installation settings..." - -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=admin --value=admin -ynh_app_setting_set --app=$app --key=password --value=password - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -# FIND AND OPEN A PORT -#================================================= -ynh_script_progression --message="Finding an available port..." - -# Find an available port -port=$(ynh_find_port --port=8095) -ynh_app_setting_set --app=$app --key=port --value=$port - -#================================================= -# INSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Installing dependencies..." - -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - -#================================================= -# CREATE A POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Creating a PostgreSQL database..." - -ynh_psql_test_if_first_run +# Maybe add that as install arg ? +email="admin@$domain" # mailman3-app database db_name_app=$(ynh_sanitize_dbid --db_name="${app}_app") db_user_app=$db_name_app db_pwd_app=$(ynh_string_random --length=30) -ynh_app_setting_set --app=$app --key=db_name_app --value=$db_name_app -ynh_app_setting_set --app=$app --key=db_pwd_app --value=$db_pwd_app -ynh_psql_setup_db --db_user=$db_user_app --db_name=$db_name_app --db_pwd=$db_pwd_app +ynh_app_setting_set --app="$app" --key="db_name_app" --value="$db_name_app" +ynh_app_setting_set --app="$app" --key="db_user_app" --value="$db_user_app" +ynh_app_setting_set --app="$app" --key="db_pwd_app" --value="$db_pwd_app" # mailman3-web database db_name_web=$(ynh_sanitize_dbid --db_name="${app}_web") db_user_web=$db_name_web db_pwd_web=$(ynh_string_random --length=30) -ynh_app_setting_set --app=$app --key=db_name_web --value=$db_name_web -ynh_app_setting_set --app=$app --key=db_pwd_web --value=$db_pwd_web -ynh_psql_setup_db --db_user=$db_user_web --db_name=$db_name_web --db_pwd=$db_pwd_web - -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." - -# Create a dedicated NGINX config -ynh_add_nginx_config - -#================================================= -# SPECIFIC SETUP -#================================================= -# ADD A CONFIGURATION -#================================================= -ynh_script_progression --message="Adding a configuration file..." +ynh_app_setting_set --app="$app" --key="db_name_web" --value="$db_name_web" +ynh_app_setting_set --app="$app" --key="db_user_web" --value="$db_user_web" +ynh_app_setting_set --app="$app" --key="db_pwd_web" --value="$db_pwd_web" # mailman3 core configuration rest_api_admin_user="rest_admin" rest_api_admin_pwd=$(head -n15 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c15) -ynh_app_setting_set --app=$app --key=rest_admin_user --value="$rest_api_admin_user" -ynh_app_setting_set --app=$app --key=rest_admin_pwd --value="$rest_api_admin_pwd" -ynh_add_config --template="../conf/mailman.cfg" --destination="/etc/mailman3/mailman.cfg" - -chmod 400 "/etc/mailman3/mailman.cfg" -chown list:list "/etc/mailman3/mailman.cfg" +ynh_app_setting_set --app="$app" --key="rest_api_admin_user" --value="$rest_api_admin_user" +ynh_app_setting_set --app="$app" --key="rest_api_admin_pwd" --value="$rest_api_admin_pwd" # hyperkitty configuration archiver_key=$(head -n32 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c32) -ynh_app_setting_set --app=$app --key=archiver_key --value="$archiver_key" -ynh_add_config --template="../conf/mailman-hyperkitty.cfg" --destination="/etc/mailman3/mailman-hyperkitty.cfg" - -chmod 400 "/etc/mailman3/mailman-hyperkitty.cfg" -chown list:list "/etc/mailman3/mailman-hyperkitty.cfg" +ynh_app_setting_set --app="$app" --key=archiver_key --value="$archiver_key" # mailman3-web configuration secret_key=$(head -n64 /dev/urandom | tail -n +1 | tr -dc -d 'a-z0-9' | head -c64) -ynh_app_setting_set --app=$app --key=secret_key --value="$secret_key" -ynh_add_config --template="../conf/mailman-web.py" --destination="/etc/mailman3/mailman-web.py" +ynh_app_setting_set --app="$app" --key=secret_key --value="$secret_key" +#================================================= +# CREATE A POSTGRESQL DATABASE +#================================================= +ynh_script_progression --message="Creating a PostgreSQL database..." +# Can' use resource helper because we need 2 dbs with specific names… + +ynh_psql_test_if_first_run + +# mailman3-app database +ynh_psql_setup_db --db_user="$db_user_app" --db_name="$db_name_app" --db_pwd="$db_pwd_app" + +# mailman3-web database +ynh_psql_setup_db --db_user="$db_user_web" --db_name="$db_name_web" --db_pwd="$db_pwd_web" + +#================================================= +# ADD A CONFIGURATION +#================================================= +ynh_script_progression --message="Adding $app's configuration files..." + +ynh_add_config --template="mailman.cfg" --destination="/etc/mailman3/mailman.cfg" +chmod 400 "/etc/mailman3/mailman.cfg" +chown list:list "/etc/mailman3/mailman.cfg" + +ynh_add_config --template="mailman-hyperkitty.cfg" --destination="/etc/mailman3/mailman-hyperkitty.cfg" +chmod 400 "/etc/mailman3/mailman-hyperkitty.cfg" +chown list:list "/etc/mailman3/mailman-hyperkitty.cfg" + +ynh_add_config --template="mailman-web.py" --destination="/etc/mailman3/mailman-web.py" chmod 440 "/etc/mailman3/mailman-web.py" chown list:www-data "/etc/mailman3/mailman-web.py" @@ -139,9 +79,8 @@ chown list:www-data "/etc/mailman3/mailman-web.py" # RUN DATABASE MIGRATIONS #================================================= ynh_script_progression --message="Running database migrations..." - pushd /usr/share/mailman3-web - python3 manage.py migrate || ynh_die --message="Mailman3 migrations failed!" + python3 manage.py migrate || ynh_die --message="Mailman3 migrations failed!" popd #================================================= @@ -172,53 +111,29 @@ sudo -su list mailman aliases ynh_systemd_action --service_name=postfix --action="restart" #================================================= -# SETUP SYSTEMD +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring a systemd service..." +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 + +# Create a dedicated NGINX config +ynh_add_nginx_config # Create a dedicated systemd config -systemctl enable $app.service --quiet -systemctl enable "$app-web".service --quiet +systemctl enable "$app.service" --quiet +systemctl enable "$app-web.service" --quiet -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - -yunohost service add $app --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" +yunohost service add "$app" --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" yunohost service add "$app-web" --description="Mailman3 web daemon" --log="/var/log/$app/web/mailman-web.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting $app's systemd services..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="restart" +ynh_systemd_action --service_name="$app" --action="restart" ynh_systemd_action --service_name="$app-web" --action="restart" -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Configuring permissions..." - -# Make app public if necessary -if [ $is_public -eq 1 ] -then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission="main" --add="visitors" -fi - -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/remove b/scripts/remove index 50c6050..ddb8ff8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,77 +8,27 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -port=$(ynh_app_setting_get --app=$app --key=port) -db_name_app=$(ynh_app_setting_get --app=$app --key=db_name_app) -db_user_app=$db_name_app -db_name_web=$(ynh_app_setting_get --app=$app --key=db_name_web) -db_user_web=$db_name_web - -#================================================= -# STANDARD REMOVE -#================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEM CONFIGURATIONS #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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 -then - ynh_script_progression --message="Removing $app service integration..." - yunohost service remove $app +if ynh_exec_warn_less yunohost service status "$app" >/dev/null; then + yunohost service remove "$app" fi - -# 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 -then - ynh_script_progression --message="Removing $app-web service integration..." - yunohost service remove "$app-web" +if ynh_exec_warn_less yunohost service status "$app-web" >/dev/null; then + yunohost service remove "$app-web" fi -#================================================= -# STOP AND REMOVE SERVICE -#================================================= -ynh_script_progression --message="Stopping and removing the systemd service..." - # Remove the dedicated systemd config -ynh_systemd_action --service_name=$app --action="stop" -systemctl disable $app.service --quiet +ynh_systemd_action --service_name="$app" --action="stop" ynh_systemd_action --service_name="$app-web" --action="stop" -systemctl disable "$app-web".service --quiet - -#================================================= -# REMOVE THE POSTGRESQL DATABASE -#================================================= -ynh_script_progression --message="Removing the PostgreSQL database..." - -# Remove a database if it exists, along with the associated user -ynh_psql_remove_db --db_user=$db_user_app --db_name=$db_name_app -ynh_psql_remove_db --db_user=$db_user_web --db_name=$db_name_web - -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - -#================================================= -# REMOVE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Removing NGINX web server configuration..." +systemctl disable "$app.service" --quiet +systemctl disable "$app-web.service" --quiet # Remove the dedicated NGINX config ynh_remove_nginx_config -#================================================= -# SPECIFIC REMOVE #================================================= # REMOVE VARIOUS FILES #================================================= @@ -94,10 +42,17 @@ ynh_secure_remove --file="/etc/$app" # Remove hook for postfix conf ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/98-postfix_mailman3" yunohost tools regen-conf postfix -ynh_systemd_action --service_name=postfix --action="restart" +ynh_systemd_action --service_name="postfix" --action="restart" #================================================= -# GENERIC FINALIZATION +# REMOVE THE POSTGRESQL DATABASE +#================================================= +ynh_script_progression --message="Removing the PostgreSQL database..." + +# Remove a database if it exists, along with the associated user +ynh_psql_remove_db --db_user="$db_user_app" --db_name="$db_name_app" +ynh_psql_remove_db --db_user="$db_user_web" --db_name="$db_name_web" + #================================================= # END OF SCRIPT #================================================= diff --git a/scripts/restore b/scripts/restore index 368276c..185f2c8 100755 --- a/scripts/restore +++ b/scripts/restore @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -10,57 +8,6 @@ source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# MANAGE SCRIPT FAILURE -#================================================= - -ynh_clean_setup () { - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -db_name_app=$(ynh_app_setting_get --app=$app --key=db_name_app) -db_user_app=$db_name_app -db_name_web=$(ynh_app_setting_get --app=$app --key=db_name_web) -db_user_web=$db_name_web - -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_script_progression --message="Validating restoration parameters..." - -test ! -d /usr/share/mailman3-web \ - || ynh_die --message="There is already an installation present at /usr/share/mailman3-web?" - -#================================================= -# STANDARD RESTORATION STEPS -#================================================= -# 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" - -#================================================= -# SPECIFIC RESTORATION -#================================================= -# REINSTALL DEPENDENCIES -#================================================= -ynh_script_progression --message="Reinstalling dependencies..." - -# Define and install dependencies -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies - #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= @@ -68,18 +15,16 @@ ynh_script_progression --message="Restoring the PostgreSQL database..." ynh_psql_test_if_first_run -db_pwd_app=$(ynh_app_setting_get --app=$app --key=db_pwd_app) -ynh_psql_setup_db --db_user=$db_user_app --db_name=$db_name_app --db_pwd=$db_pwd_app -ynh_psql_execute_file_as_root --file="./db_app.sql" --database=$db_name_app +ynh_psql_setup_db --db_user="$db_user_app" --db_name="$db_name_app" --db_pwd="$db_pwd_app" +ynh_psql_execute_file_as_root --file="./db_app.sql" --database="$db_name_app" -db_pwd_web=$(ynh_app_setting_get --app=$app --key=db_pwd_web) -ynh_psql_setup_db --db_user=$db_user_web --db_name=$db_name_web --db_pwd=$db_pwd_web -ynh_psql_execute_file_as_root --file="./db_web.sql" --database=$db_name_web +ynh_psql_setup_db --db_user="$db_user_web" --db_name="$db_name_web" --db_pwd="$db_pwd_web" +ynh_psql_execute_file_as_root --file="./db_web.sql" --database="$db_name_web" #================================================= # RESTORE VARIOUS FILES #================================================= -ynh_script_progression --message="Restoring various files..." +ynh_script_progression --message="Restoring $app's configuration files..." ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/98-postfix_mailman3" yunohost tools regen-conf postfix @@ -95,37 +40,26 @@ ynh_secure_remove --file="/etc/$app/mailman-web.py" ynh_restore_file --origin_path="/etc/$app/mailman-web.py" #================================================= -# RESTORE SYSTEMD +# RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring the systemd configuration..." +ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 -systemctl enable $app.service --quiet -systemctl enable "$app-web".service --quiet +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +systemctl enable "$app.service" --quiet +systemctl enable "$app-web.service" --quiet -yunohost service add $app --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" +yunohost service add "$app" --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" yunohost service add "$app-web" --description="Mailman3 web daemon" --log="/var/log/$app/web/mailman-web.log" #================================================= -# START SYSTEMD SERVICE +# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 -# Start a systemd service -ynh_systemd_action --service_name=$app --action=restart +ynh_systemd_action --service_name="$app" --action=restart ynh_systemd_action --service_name="$app-web" --action=restart -#================================================= -# GENERIC FINALIZATION -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 5a40761..af812ff 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,7 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START #================================================= # IMPORT GENERIC HELPERS #================================================= @@ -9,76 +7,57 @@ source _common.sh source /usr/share/yunohost/helpers -#================================================= -# LOAD SETTINGS -#================================================= -ynh_script_progression --message="Loading installation settings..." - -app=$YNH_APP_INSTANCE_NAME - -domain=$(ynh_app_setting_get --app=$app --key=domain) -path_url=$(ynh_app_setting_get --app=$app --key=path) -db_name_app=$(ynh_app_setting_get --app=$app --key=db_name_app) -db_name_web=$(ynh_app_setting_get --app=$app --key=db_name_web) - -#================================================= -# CHECK VERSION -#================================================= -ynh_script_progression --message="Checking version..." - -upgrade_type=$(ynh_check_app_version_changed) - -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - ynh_clean_check_starting - # Restore it if the upgrade fails - ynh_restore_upgradebackup -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= ynh_script_progression --message="Stopping a systemd service..." -ynh_systemd_action --service_name=$app --action="stop" -ynh_systemd_action --service_name="$app-web" --action=stop +ynh_systemd_action --service_name="$app" --action="stop" +ynh_systemd_action --service_name="$app-web" --action="stop" #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all +# Create missing db_user_* as copy of db_name_* +if [ -z "${db_user_app:-}" ]; then + db_user_app="$db_name_app" + ynh_app_setting_set --app="$app" --key="db_user_app" --value="$db_user_app" +fi +if [ -z "${db_user_web:-}" ]; then + db_user_web="$db_name_web" + ynh_app_setting_set --app="$app" --key="db_user_web" --value="$db_user_web" +fi - ynh_app_setting_delete --app=$app --key=is_public +# Migrate rest_admin_* -> rest_api_admin_* +if [ -z "${rest_api_admin_user:-}" ]; then + rest_api_admin_user="$rest_admin_user" + ynh_app_setting_set --app="$app" --key="rest_api_admin_user" --value="$rest_api_admin_user" + ynh_app_setting_delete --app="$app" --key="rest_admin_user" +fi +if [ -z "${rest_api_admin_pwd:-}" ]; then + rest_api_admin_pwd="$rest_admin_pwd" + ynh_app_setting_set --app="$app" --key="rest_api_admin_pwd" --value="$rest_api_admin_pwd" + ynh_app_setting_delete --app="$app" --key="rest_admin_pwd" fi #================================================= -# NGINX CONFIGURATION +# ADD A CONFIGURATION #================================================= -ynh_script_progression --message="Upgrading NGINX web server configuration..." +ynh_script_progression --message="Updating $app's configuration files..." -# Create a dedicated NGINX config -ynh_add_nginx_config +ynh_add_config --template="mailman.cfg" --destination="/etc/mailman3/mailman.cfg" +chmod 400 "/etc/mailman3/mailman.cfg" +chown list:list "/etc/mailman3/mailman.cfg" -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." +ynh_add_config --template="mailman-hyperkitty.cfg" --destination="/etc/mailman3/mailman-hyperkitty.cfg" +chmod 400 "/etc/mailman3/mailman-hyperkitty.cfg" +chown list:list "/etc/mailman3/mailman-hyperkitty.cfg" -ynh_exec_warn_less ynh_install_app_dependencies $pkg_dependencies +ynh_add_config --template="mailman-web.py" --destination="/etc/mailman3/mailman-web.py" +chmod 440 "/etc/mailman3/mailman-web.py" +chown list:www-data "/etc/mailman3/mailman-web.py" #================================================= # POSTFIX CONFIGURATION @@ -88,33 +67,30 @@ ynh_script_progression --message="Configuring postfix mail server..." # Add postfix configuration hook and regen postfix conf cp -R ../sources/hooks/conf_regen/98-postfix_mailman3 /usr/share/yunohost/hooks/conf_regen/ yunohost tools regen-conf postfix -ynh_systemd_action --service_name=postfix --action="reload" +ynh_systemd_action --service_name="postfix" --action="reload" #================================================= -# GENERIC FINALIZATION +# REAPPLY SYSTEM CONFIGURATIONS #================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." +ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 -yunohost service add $app --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" +# Create a dedicated NGINX config +ynh_add_nginx_config + +systemctl enable "$app.service" --quiet +systemctl enable "$app-web.service" --quiet + +yunohost service add "$app" --description="Mailman3 daemon" --log="/var/log/$app/mailman.log" yunohost service add "$app-web" --description="Mailman3 web daemon" --log="/var/log/$app/web/mailman-web.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." +ynh_script_progression --message="Starting $app's systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action=start +ynh_systemd_action --service_name="$app" --action=start ynh_systemd_action --service_name="$app-web" --action=start -#================================================= -# RELOAD NGINX -#================================================= -ynh_script_progression --message="Reloading NGINX web server..." - -ynh_systemd_action --service_name=nginx --action=reload - #================================================= # END OF SCRIPT #================================================= diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..509b515 --- /dev/null +++ b/tests.toml @@ -0,0 +1,13 @@ +#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json + +test_format = 1.0 + +[default] + + exclude = ["change_url"] + + # ------------------------------- + # Commits to test upgrade from + # ------------------------------- + + test_upgrade_from.6e7e8724d042780edea902ae5adf54eed2e0ee66.name = "Latest packagingv1"