Browse Source

Fix log level on runner

master
Aeris 3 years ago
parent
commit
d92bf21832
2 changed files with 10 additions and 5 deletions
  1. 1
    1
      bin/check_ssh.rb
  2. 9
    4
      bin/check_xmpp.rb

+ 1
- 1
bin/check_ssh.rb View File

@@ -7,7 +7,7 @@ require 'cryptcheck'
7 7
 name, port, level = case ARGV.length
8 8
 	when 1 then [ARGV[0], 22, :info]
9 9
 	when 2 then [ARGV[0], ARGV[1], :info]
10
-	when 3 then [ARGV[0], ARGV[1], ARGV[3]]
10
+	when 3 then [ARGV[0], ARGV[1], ARGV[2]]
11 11
 end
12 12
 
13 13
 ::CryptCheck::Logger.level = level

+ 9
- 4
bin/check_xmpp.rb View File

@@ -4,11 +4,16 @@ require 'rubygems'
4 4
 require 'bundler/setup'
5 5
 require 'cryptcheck'
6 6
 
7
-name = ARGV[0]
7
+name, type, level = case ARGV.length
8
+						when 1 then [ARGV[0], :s2s, :info]
9
+						when 2 then [ARGV[0], ARGV[1].to_sym, :info]
10
+						when 3 then [ARGV[0], ARGV[1].to_sym, ARGV[2].to_sym]
11
+					end
12
+
8 13
 if name
9
-	::CryptCheck::Logger.level = :info
10
-	server = ::CryptCheck::Tls::Xmpp::Server.new(name, ARGV[1] || :s2s)
11
-	grade = ::CryptCheck::Tls::Xmpp::Grade.new(server)
14
+	::CryptCheck::Logger.level = level
15
+	server = ::CryptCheck::Tls::Xmpp::Server.new name, type
16
+	grade = ::CryptCheck::Tls::Xmpp::Grade.new server
12 17
 	::CryptCheck::Logger.info { '' }
13 18
 	grade.display
14 19
 else

Loading…
Cancel
Save