17 lines
328 B
Ruby
Executable File
17 lines
328 B
Ruby
Executable File
#!/usr/bin/env ruby
|
|
|
|
require "cgi"
|
|
require "erb"
|
|
|
|
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, "page.erb")))
|
|
|
|
cgi.out("type" => "text/html", "charset" => "UTF-8") do
|
|
template.result(binding)
|
|
end
|