X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=prosodyctl;h=c3adad4dcffb8b9a1b4fbb0a4e28a13391afdb49;hb=19da869fa2d8387d1640dd7493ce455ff4723331;hp=cf2ab74df253f1c850d9597acebc82ead6f82945;hpb=39bac64932953b78123d38f294cb9baae7c5496e;p=prosody.git diff --git a/prosodyctl b/prosodyctl index cf2ab74d..c3adad4d 100755 --- a/prosodyctl +++ b/prosodyctl @@ -687,7 +687,12 @@ function cert_commands.config(arg) 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("");