diff --git a/README.md b/README.md index bd79597..2a760c1 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,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 database as its data base. -**Shipped version:** 2.5.1~ynh2 +**Shipped version:** 2.5.1~ynh3 **Demo:** https://demo.listmonk.app/ diff --git a/README_fr.md b/README_fr.md index bbe1f9b..02434e8 100644 --- a/README_fr.md +++ b/README_fr.md @@ -19,7 +19,7 @@ Si vous n’avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po Listmonk est un gestionnaire de newsletter et de liste de diffusion autonome et auto-hébergé. Il est rapide, riche en fonctionnalités et emballé dans un seul binaire. Il utilise une base de données PostgreSQL comme base de données. -**Version incluse :** 2.5.1~ynh2 +**Version incluse :** 2.5.1~ynh3 **Démo :** https://demo.listmonk.app/ diff --git a/doc/POST_INSTALL.md b/doc/POST_INSTALL.md new file mode 100644 index 0000000..fbf8d69 --- /dev/null +++ b/doc/POST_INSTALL.md @@ -0,0 +1,16 @@ +You have to configure SMTP from the web interface at https://__DOMAIN__/admin + +Visit Settings -> General and replace these values: + +- Root URL: https://__DOMAIN__ +- Default from email: listmonk <__APP__@__DOMAIN__> + +Visit Settings -> SMTP and replace with these values: + +- Host: 127.0.0.1 +- Port: 25 +- Auth protocol: PLAIN +- User: __APP__ +- Password: __MAIL_PWD__ + +Then, test the connection diff --git a/manifest.toml b/manifest.toml index 1b5ca1d..2eb253f 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Listmonk" description.en = "Newsletter and mailing list manager" description.fr = "Manager de newsletter et mailing list" -version = "2.5.1~ynh2" +version = "2.5.1~ynh3" maintainers = ["Navan Chauhan"] @@ -34,9 +34,6 @@ ram.runtime = "50M" type = "group" default = "visitors" - [install.admin] - type = "user" - [resources] [resources.sources] @@ -50,7 +47,13 @@ ram.runtime = "50M" arm64.sha256 = "832c5a34ed78446c179ed5423cdbce51d3e51333c1ea6cf11c74b63e0776193a" in_subdir = false + autoupdate.strategy = "latest_github_release" + autoupdate.asset.amd64 = ".*_linux_amd64.tar.gz" + autoupdate.asset.armhf = ".*_linux_armv7.tar.gz" + autoupdate.asset.arm64 = ".*_linux_arm64.tar.gz" + [resources.system_user] + allow_email = true [resources.ports] @@ -65,10 +68,11 @@ ram.runtime = "50M" admin.auth_header = false admin.allowed = "admins" + # internal API, should not be allowed to visitors api.url = "/api" api.show_tile = false api.auth_header = false - api.allowed = "visitors" + api.allowed = "admins" [resources.apt] packages = "postgresql" diff --git a/scripts/_common.sh b/scripts/_common.sh index 944a65e..35ad7ea 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -8,6 +8,29 @@ # PERSONAL HELPERS #================================================= +# FIXME https://listmonk.app/docs/swagger/#/Settings/getSettings +_listmonk_configure_with_api () { + python -c """ +from urllib.request import urlopen, Request +with urlopen('http://localhost:$port/api/settings') as url: + data = json.load(url) + +data['data']['app.root_url'] = "https://$domain" +data['data']['app.from_email'] = "listmonk " +data['data']['smtp'][0]['host'] = "127.0.0.1" +data['data']['smtp'][0]['auth_protocol'] = "plain" +data['data']['smtp'][0]['username'] = "$app" +data['data']['smtp'][0]['password'] = "$mail_pwd" + +data_bytes = bytes(json.dumps(data), encoding='utf8') + +request = Request('http://localhost:$port/api/settings', method='PUT', data=data_bytes, headers={'Content-Type': 'application/json'}) + +with urlopen(request) as response: + print(response.read()) +""" +} + #================================================= # EXPERIMENTAL HELPERS #================================================= diff --git a/tests.toml b/tests.toml index a26dece..cc52fda 100644 --- a/tests.toml +++ b/tests.toml @@ -7,3 +7,6 @@ test_format = 1.0 # ------------------------------- test_upgrade_from.4b1297d8.name = "Upgrade from 2.3.0" + test_upgrade_from.4b1297d8.args.admin = "package_checker" + test_upgrade_from.4b1297d8.args.password = "much_s3cur1ty" + test_upgrade_from.4b1297d8.args.domain = "domain.tld"