Diff

prosodyctl @ 9826:bdc2a024933b

prosodyctl: about: Report the current operating system according to uname
author Kim Alvefur <zash@zash.se>
date Sat, 08 Dec 2018 18:02:56 +0100
parent 9798:7ce7ee9cd1c5
child 9857:3af3a702c54c
line wrap: on
line diff
--- a/prosodyctl	Sat Feb 09 20:54:35 2019 +0100
+++ b/prosodyctl	Sat Dec 08 18:02:56 2018 +0100
@@ -363,6 +363,13 @@
 				.."\n  ";
 		end)));
 	print("");
+	local have_pposix, pposix = pcall(require, "util.pposix");
+	if have_pposix and pposix.uname then
+		print("# Operating system");
+		local uname, err = pposix.uname();
+		print(uname and uname.sysname .. " " .. uname.release or "Unknown POSIX", err or "");
+		print("");
+	end
 	print("# Lua environment");
 	print("Lua version:             ", _G._VERSION);
 	print("");