Software /
code /
prosody
Changeset
6035:1b5ca55bf895
prosodyctl: Show real error if certificate config file can't be opened
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 22 Mar 2014 12:02:11 +0100 |
parents | 6034:ee14da71d3fc |
children | 6038:b3ceb7627e27 6040:b3b1c9da38fb 6045:a5b5bce71a11 |
files | prosodyctl |
diffstat | 1 files changed, 6 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/prosodyctl Sat Mar 22 12:42:01 2014 +0100 +++ b/prosodyctl Sat Mar 22 12:02:11 2014 +0100 @@ -684,7 +684,12 @@ conf.distinguished_name[k] = nv ~= "." and nv or nil; end end - local conf_file = io.open(conf_filename, "w"); + local conf_file, err = io.open(conf_filename, "w"); + if not conf_file then + show_warning("Could not open OpenSSL config file for writing"); + show_warning(err); + os.exit(1); + end conf_file:write(conf:serialize()); conf_file:close(); print("");