mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 06:07:37 +03:00
prosodyctl: status: Show warning if we can't find a running Prosody, and we didn't switch user
This commit is contained in:
parent
b84c790f0b
commit
264c83dbd9
1 changed files with 5 additions and 0 deletions
|
@ -314,6 +314,11 @@ function commands.status(arg)
|
||||||
return 0;
|
return 0;
|
||||||
else
|
else
|
||||||
show_message("Prosody is not running");
|
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
|
return 2
|
||||||
end
|
end
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue