From db7ffc787860325d4d4cfdbb7a45187a5d0767bf Mon Sep 17 00:00:00 2001 From: cn Date: Mon, 25 Feb 2013 19:58:43 +0100 Subject: [PATCH] Add usage output --- status.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) mode change 100644 => 100755 status.rb diff --git a/status.rb b/status.rb old mode 100644 new mode 100755 index 976fc8f..cf9c811 --- a/status.rb +++ b/status.rb @@ -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