bin/cloud66_agent in cloud66_agent-1.1.2 vs bin/cloud66_agent in cloud66_agent-1.2.0

- old
+ new

@@ -77,9 +77,15 @@ end.order! Cloud66Agent.fail2ban(@is_banned, @ip_address, @attack, @port) elsif command == 'vitals' # disable vital signs exit 0 +elsif command == 'send_message' + OptionParser.new do |opts| + opts.on('--key KEY', 'Key related to message ') { |v| @key = v } + opts.on('--options OPTIONS', 'Added options for message') { |v| @options = JSON.parse(v) unless v.nil? } + end.order! + Cloud66Agent.send_message(@key,@options) else begin Cloud66Agent.send command rescue $logger.error "Invalid command: #{command}"