Add usage output

This commit is contained in:
cn 2013-02-25 19:58:43 +01:00
parent 91708da841
commit db7ffc7878
1 changed files with 5 additions and 1 deletions

6
status.rb Normal file → Executable file
View File

@ -68,4 +68,8 @@ class OpenVPNStatusWeb
end
end
Rack::Handler::Mongrel.run OpenVPNStatusWeb.new(ARGV[0], ARGV[1]), :Host => ARGV[2], :Port => ARGV[3]
if ARGV.length != 4
puts "Usage: status.rb vpn-name status-log listen-host listen-port"
else
Rack::Handler::Mongrel.run OpenVPNStatusWeb.new(ARGV[0], ARGV[1]), :Host => ARGV[2], :Port => ARGV[3]
end