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
6 changed files with 10 additions and 7 deletions

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)