cloudblocks 0.0.12d → 0.0.12e
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/cb-agent +5 -14
- metadata +1 -1
data/bin/cb-agent
CHANGED
@@ -422,25 +422,16 @@ if @api_key.empty?
|
|
422
422
|
puts 'Invalid Secret key'
|
423
423
|
exit -1
|
424
424
|
end
|
425
|
-
|
426
|
-
save_config
|
427
|
-
puts 'Configuration Saved'
|
428
425
|
end
|
429
426
|
|
430
427
|
# no agent id?
|
431
428
|
if @agent_id.empty?
|
432
|
-
|
429
|
+
@quartz = CloudQuartz.new(:api_key => @api_key, :url => @url, :secret_key => @secret_key)
|
430
|
+
register
|
431
|
+
q = ask("Start the agent as a daemon? ") { |q| q.default = "Y" }
|
433
432
|
if q.chomp.downcase != 'n'
|
434
|
-
@quartz = CloudQuartz.new(:api_key => @api_key, :url => @url, :secret_key => @secret_key)
|
435
|
-
|
436
|
-
|
437
|
-
q = ask("Start the agent as a daemon? ") { |q| q.default = "Y" }
|
438
|
-
if q.chomp.downcase != 'n'
|
439
|
-
@quartz = CloudQuartz.new(:api_key => @api_key, :url => @url, :agent_id => @agent_id, :secret_key => @secret_key)
|
440
|
-
start
|
441
|
-
else
|
442
|
-
exit 0
|
443
|
-
end
|
433
|
+
@quartz = CloudQuartz.new(:api_key => @api_key, :url => @url, :agent_id => @agent_id, :secret_key => @secret_key)
|
434
|
+
start
|
444
435
|
else
|
445
436
|
exit 0
|
446
437
|
end
|