Software /
code /
prosody
Comparison
prosodyctl @ 7530:f14094d10925
Merge 0.10 -> trunk
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 Jul 2016 09:39:50 +0100 |
parent | 7494:f82356adcd71 |
parent | 7528:50365a496890 |
child | 7686:8d6f367bed8c |
comparison
equal
deleted
inserted
replaced
7525:bad62a7f461f | 7530:f14094d10925 |
---|---|
266 end | 266 end |
267 end | 267 end |
268 | 268 |
269 local show_message, show_warning = prosodyctl.show_message, prosodyctl.show_warning; | 269 local show_message, show_warning = prosodyctl.show_message, prosodyctl.show_warning; |
270 local show_usage = prosodyctl.show_usage; | 270 local show_usage = prosodyctl.show_usage; |
271 local getchar, getpass = prosodyctl.getchar, prosodyctl.getpass; | |
272 local show_yesno = prosodyctl.show_yesno; | 271 local show_yesno = prosodyctl.show_yesno; |
273 local show_prompt = prosodyctl.show_prompt; | 272 local show_prompt = prosodyctl.show_prompt; |
274 local read_password = prosodyctl.read_password; | 273 local read_password = prosodyctl.read_password; |
275 | 274 |
276 local jid_split = require "util.jid".prepped_split; | 275 local jid_split = require "util.jid".prepped_split; |
545 print("Data directory: "..relpath(pwd, data_path)); | 544 print("Data directory: "..relpath(pwd, data_path)); |
546 print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or ".")); | 545 print("Config directory: "..relpath(pwd, CFG_CONFIGDIR or ".")); |
547 print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); | 546 print("Source directory: "..relpath(pwd, CFG_SOURCEDIR or ".")); |
548 print("Plugin directories:") | 547 print("Plugin directories:") |
549 print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path) | 548 print(" "..(prosody.paths.plugins:gsub("([^;]+);?", function(path) |
550 local opath = path; | |
551 path = config.resolve_relative_path(pwd, path); | 549 path = config.resolve_relative_path(pwd, path); |
552 local hgid, hgrepo = hg.check_id(path); | 550 local hgid, hgrepo = hg.check_id(path); |
553 if not hgid and hgrepo then | 551 if not hgid and hgrepo then |
554 return path.." - "..hgrepo .."!\n "; | 552 return path.." - "..hgrepo .."!\n "; |
555 end | 553 end |
802 if use_existing(cert_filename) then | 800 if use_existing(cert_filename) then |
803 return nil, cert_filename; | 801 return nil, cert_filename; |
804 end | 802 end |
805 local _, key_filename = cert_commands.key({arg[1]}); | 803 local _, key_filename = cert_commands.key({arg[1]}); |
806 local _, conf_filename = cert_commands.config(arg); | 804 local _, conf_filename = cert_commands.config(arg); |
807 local ret; | |
808 if key_filename and conf_filename and cert_filename | 805 if key_filename and conf_filename and cert_filename |
809 and openssl.req{new=true, x509=true, nodes=true, key=key_filename, | 806 and openssl.req{new=true, x509=true, nodes=true, key=key_filename, |
810 days=365, sha256=true, utf8=true, config=conf_filename, out=cert_filename} then | 807 days=365, sha256=true, utf8=true, config=conf_filename, out=cert_filename} then |
811 show_message("Certificate written to ".. cert_filename); | 808 show_message("Certificate written to ".. cert_filename); |
812 print(); | 809 print(); |