6edd127
Hack by Robert Scheck <robert@fedoraproject.org> for prosody >= 0.11.7 which removes the
6edd127
service_command_warning() function for EPEL 6, because the SysVinit script actually uses
6edd127
this functionality.
6edd127
6edd127
--- prosody-0.11.7/prosodyctl				2020-05-31 22:39:34.000000000 +0200
6edd127
+++ prosody-0.11.7/prosodyctl.epel6			2020-10-01 22:57:47.161806878 +0200
6edd127
@@ -199,26 +199,11 @@
6edd127
 	return 1;
6edd127
 end
6edd127
 
6edd127
-local function service_command_warning(service_command)
6edd127
-	if prosody.installed and configmanager.get("*", "prosodyctl_service_warnings") ~= false then
6edd127
-		show_warning("WARNING: Use of prosodyctl start/stop/restart/reload is not recommended");
6edd127
-		show_warning("         if Prosody is managed by an init system - use that directly instead.");
6edd127
-		lfs = lfs or require
6edd127
-		if lfs.attributes("/etc/systemd") then
6edd127
-			show_warning("         e.g. systemctl %s prosody", service_command);
6edd127
-		elseif lfs.attributes("/etc/init.d/prosody") then
6edd127
-			show_warning("         e.g. /etc/init.d/prosody %s", service_command);
6edd127
-		end
6edd127
-		show_warning("");
6edd127
-	end
6edd127
-end
6edd127
-
6edd127
 function commands.start(arg)
6edd127
 	if arg[1] == "--help" then
6edd127
 		show_usage([[start]], [[Start Prosody]]);
6edd127
 		return 1;
6edd127
 	end
6edd127
-	service_command_warning("start");
6edd127
 	local ok, ret = prosodyctl.isrunning();
6edd127
 	if not ok then
6edd127
 		show_message(error_messages[ret]);
6edd127
@@ -309,8 +294,6 @@
6edd127
 		return 1;
6edd127
 	end
6edd127
 
6edd127
-	service_command_warning("stop");
6edd127
-
6edd127
 	if not prosodyctl.isrunning() then
6edd127
 		show_message("Prosody is not running");
6edd127
 		return 1;
6edd127
@@ -346,8 +329,6 @@
6edd127
 		return 1;
6edd127
 	end
6edd127
 
6edd127
-	service_command_warning("restart");
6edd127
-
6edd127
 	commands.stop(arg);
6edd127
 	return commands.start(arg);
6edd127
 end
6edd127
@@ -441,8 +422,6 @@
6edd127
 		return 1;
6edd127
 	end
6edd127
 
6edd127
-	service_command_warning("reload");
6edd127
-
6edd127
 	if not prosodyctl.isrunning() then
6edd127
 		show_message("Prosody is not running");
6edd127
 		return 1;