X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=prosodyctl;h=00aeac400752d80dce5821fe33abba154fd8ba66;hb=cfa1e6546491781ac1d6d4b1f62f0c3977c8b4e6;hp=cf2ab74df253f1c850d9597acebc82ead6f82945;hpb=1b01b4fe53c7e81fc6911a63031713166f0917bf;p=prosody.git diff --git a/prosodyctl b/prosodyctl index cf2ab74d..00aeac40 100755 --- a/prosodyctl +++ b/prosodyctl @@ -414,7 +414,11 @@ function commands.start(arg) local ok, ret = prosodyctl.start(); if ok then - if config.get("*", "daemonize") ~= false then + local daemonize = config.get("*", "daemonize"); + if daemonize == nil then + daemonize = prosody.installed; + end + if daemonize then local i=1; while true do local ok, running = prosodyctl.isrunning(); @@ -687,7 +691,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("");