Software /
code /
prosody
Changeset
7743:d018ffc9238c
core.certmanager: Translate "no start line" to something friendlier (thanks santiago)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Nov 2016 20:08:48 +0100 |
parents | 7742:18aad564cbc5 |
children | 7744:4d9186d990a5 |
files | core/certmanager.lua |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/core/certmanager.lua Fri Nov 25 05:09:44 2016 +0100 +++ b/core/certmanager.lua Sat Nov 26 20:08:48 2016 +0100 @@ -184,9 +184,12 @@ err = err or "invalid ssl config" local file = err:match("^error loading (.-) %("); if file then + local typ; if file == "private key" then + typ = file; file = user_ssl_config.key or "your private key"; elseif file == "certificate" then + typ = file; file = user_ssl_config.certificate or "your certificate file"; end local reason = err:match("%((.+)%)$") or "some reason"; @@ -196,6 +199,8 @@ reason = "Check that the path is correct, and the file exists."; elseif reason == "system lib" then reason = "Previous error (see logs), or other system error."; + elseif reason == "no start line" then + reason = "Check that the file contains a "..(typ or file); elseif reason == "(null)" or not reason then reason = "Check that the file exists and the permissions are correct"; else