Read hostname from /etc/hostname

This commit is contained in:
josh committed 2026-03-27 23:38:02 -04:00
1 parent bf4fd38202
commit d206cad0c5
2 files changed
+4 -2

No files matched your search

+2
View File
@@ -7,6 +7,8 @@ ASSETS_DIR = File.join(__dir__, "../assets")
cgi = CGI.new
hostname = File.read("/etc/hostname").strip rescue "localhost"
template = ERB.new(File.read(File.join(ASSETS_DIR, "login.erb")))
cgi.out("type" => "text/html", "charset" => "UTF-8") do