mirror of
https://github.com/cmur2/openvpn-status-web.git
synced 2024-12-22 12:54:24 +01:00
Locate template relative to current file not cwd
This commit is contained in:
parent
bdf26997a5
commit
1cdcb69652
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require 'erb'
|
||||
|
||||
@ -27,7 +28,7 @@ class OpenVPNStatusWeb
|
||||
end
|
||||
|
||||
def call(env)
|
||||
main_tmpl = read_template('main.html.erb')
|
||||
main_tmpl = read_template(File.join(File.dirname(__FILE__), 'main.html.erb'))
|
||||
# variables for template
|
||||
name = @name
|
||||
client_list, routing_table, global_stats = read_status_log(@file)
|
||||
|
Loading…
Reference in New Issue
Block a user