Fix #180: Letsencrypt import not working

Letsencrypt certificate import procedure was not working on server that had never installed Prosody.
Adding `prosody_user` in the Prosody configuration file to fix this.
Updating the procedure: the `chown` is no more needed in `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh`.
This commit is contained in:
John Livingston 2023-06-08 10:22:43 +02:00
parent 083b075445
commit 8f66ea4032
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
6 changed files with 10 additions and 7 deletions

View File

@ -1,5 +1,9 @@
# Changelog
## 7.0.2
* Fix: Letsencrypt certificate import procedure was not working on server that had never installed Prosody. Adding `prosody_user` in the Prosody configuration file to fix this. Updating the procedure: the `chown` is no more needed in `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh`.
## 7.0.1
* Fix: trying to connect to a remote instance using direct s2s won't work if local instance has not the feature enabled, and if the remote instance does not know the local one. So using Websocket S2S in such case (that embed a discovery mecanism).

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "peertube-plugin-livechat",
"version": "7.0.1",
"version": "7.0.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "peertube-plugin-livechat",
"version": "7.0.1",
"version": "7.0.2",
"license": "AGPL-3.0",
"dependencies": {
"async": "^3.2.2",

View File

@ -1,7 +1,7 @@
{
"name": "peertube-plugin-livechat",
"description": "PeerTube plugin livechat: offers a way to embed a chat system into Peertube.",
"version": "7.0.1",
"version": "7.0.2",
"license": "AGPL-3.0",
"author": {
"name": "John Livingston",

View File

@ -1,5 +1,6 @@
import type { ProsodyFilePaths } from './paths'
import type { ExternalComponent } from './components'
import { userInfo } from 'os'
type ConfigEntryValue = boolean | number | string | ConfigEntryValue[]
@ -154,6 +155,8 @@ class ProsodyConfigContent {
this.global.set('allow_registration', false)
this.global.set('admins', [])
this.global.set('prosody_user', userInfo().username)
this.global.set('pidfile', this.paths.pid)
this.global.set('plugin_paths', [this.paths.modules])
this.global.set('data_path', this.paths.data)

View File

@ -180,8 +180,6 @@ We will create a file `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh` contain
--config /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua \
cert import \
room.your_instance.tld your_instance.tld /etc/letsencrypt/live
chown peertube:peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs/*
```
Then we ask to generate the certificate:

View File

@ -190,8 +190,6 @@ On va créer un fichier `/etc/letsencrypt/renewal-hooks/deploy/prosody.sh` conte
--config /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/prosody.cfg.lua \
cert import \
room.votre_instance.tld votre_instance.tld /etc/letsencrypt/live
chown peertube:peertube /var/www/peertube/storage/plugins/data/peertube-plugin-livechat/prosody/certs/*
```
Puis on demande à générer le certificat :