From d40c43dffe69678eb1a63ac6f063b6b7ae8fdcec Mon Sep 17 00:00:00 2001
From: Kim Alvefur <zash@zash.se>
Date: Sat, 22 Apr 2017 19:12:51 +0200
Subject: prosodyctl: Attempt to reload prosody after importing certificates

---
 prosodyctl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/prosodyctl b/prosodyctl
index bee90665..dcc98a79 100755
--- a/prosodyctl
+++ b/prosodyctl
@@ -897,6 +897,10 @@ function cert_commands.import(arg)
 	end
 	if imported[1] then
 		show_message("Imported certificate and key for hosts "..table.concat(imported, ", "));
+		local ok, err = prosodyctl.reload();
+		if not ok and err ~= "not-running" then
+			show_message(error_messages[err]);
+		end
 	else
 		show_warning("No certificates imported :(");
 		return 1;
-- 
cgit v1.2.3