Changeset

1115:8a7bc1a5eae6

prosodyctl: status: Show warning if we can't find a running Prosody, and we didn't switch user
author Matthew Wild <mwild1@gmail.com>
date Tue, 05 May 2009 13:24:17 +0100
parents 1114:c463e30da312
children 1116:507702cf44f8
files prosodyctl
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/prosodyctl	Tue May 05 13:23:46 2009 +0100
+++ b/prosodyctl	Tue May 05 13:24:17 2009 +0100
@@ -314,6 +314,11 @@
 		return 0;
 	else
 		show_message("Prosody is not running");
+		if not switched_user and current_uid ~= 0 then
+			print("\nNote: You will also see this if prosodyctl is not running under the same");
+			print("      user account as Prosody. Try running as root (e.g. with 'sudo' in front) to");
+			print("      gain access to Prosody's real status.");
+		end
 		return 2
 	end
 	return 1;