cloudblocks 0.0.12i → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/cb-agent +10 -10
- metadata +4 -4
data/bin/cb-agent
CHANGED
@@ -35,7 +35,7 @@ public
|
|
35
35
|
def start
|
36
36
|
begin
|
37
37
|
@log.info "Attempting to start the CloudBlocks Agent"
|
38
|
-
puts "Attempting to start the CloudBlocks Agent"
|
38
|
+
puts "Attempting to start the CloudBlocks Agent..."
|
39
39
|
|
40
40
|
pid = get_pid
|
41
41
|
if pid != 0
|
@@ -72,7 +72,7 @@ def start
|
|
72
72
|
warn "Cannot start the CloudBlocks Agent: #{exc.message}"
|
73
73
|
end
|
74
74
|
|
75
|
-
puts "The CloudBlocks Agent has been started"
|
75
|
+
puts "The CloudBlocks Agent has been started!"
|
76
76
|
else
|
77
77
|
run
|
78
78
|
end
|
@@ -83,8 +83,8 @@ end
|
|
83
83
|
|
84
84
|
def stop
|
85
85
|
pid = get_pid
|
86
|
-
@log.info "
|
87
|
-
puts "
|
86
|
+
@log.info "Attempting to stop the CloudBlocks Agent"
|
87
|
+
puts "Attempting to stop the CloudBlocks Agent..."
|
88
88
|
|
89
89
|
begin
|
90
90
|
@quartz.status(2, @version, plugin_meta_data)
|
@@ -98,7 +98,7 @@ def stop
|
|
98
98
|
rescue
|
99
99
|
end
|
100
100
|
File.delete(@pid_full)
|
101
|
-
puts "The CloudBlocks Agent has been stopped"
|
101
|
+
puts "The CloudBlocks Agent has been stopped!"
|
102
102
|
else
|
103
103
|
warn "Nothing to do - the CloudBlocks Agent was not running"
|
104
104
|
exit -1
|
@@ -106,7 +106,7 @@ def stop
|
|
106
106
|
end
|
107
107
|
|
108
108
|
def register
|
109
|
-
puts "Registering the CloudBlocks Agent with #{@url} and API Key #{@api_key}"
|
109
|
+
puts "Registering the CloudBlocks Agent with #{@url} and API Key #{@api_key}..."
|
110
110
|
os_name = RUBY_PLATFORM
|
111
111
|
os_id = os_name.include?('darwin') ? 5 : 1
|
112
112
|
agent = { :agent_type_id => os_id, :agent_name => Socket.gethostname, :agent_timezone => Time.new.zone, :extra => os_name}
|
@@ -123,11 +123,11 @@ def register
|
|
123
123
|
end
|
124
124
|
|
125
125
|
def unregister
|
126
|
-
puts "
|
126
|
+
puts "Unregistering the CloudBlocks Agent #{@agent_id} with #{@url}..."
|
127
127
|
@agent_id = ""
|
128
128
|
@quartz.unregister(@agent_id)
|
129
129
|
save_config
|
130
|
-
puts "Unregistered"
|
130
|
+
puts "Unregistered successfully!"
|
131
131
|
end
|
132
132
|
|
133
133
|
private
|
@@ -416,7 +416,7 @@ end
|
|
416
416
|
|
417
417
|
# still no api key, we need to get it
|
418
418
|
if @api_key.empty?
|
419
|
-
puts 'CloudBlocks Agent
|
419
|
+
puts 'CloudBlocks Agent initial setup:'
|
420
420
|
@api_key = ask('Please enter your API key. (you can find it at https://cloudblocks.co/me): ')
|
421
421
|
if @api_key.length != 32
|
422
422
|
puts 'Invalid API key'
|
@@ -445,7 +445,7 @@ if command.nil? || command.empty?
|
|
445
445
|
puts "The CloudBlocks Agent is currently running. Use the stop command to stop it or --help for more info"
|
446
446
|
exit -1
|
447
447
|
end
|
448
|
-
puts 'The CloudBlocks Agent is currently
|
448
|
+
puts 'The CloudBlocks Agent is not currently running. Use the start command to start it or --help for more information'
|
449
449
|
exit -1
|
450
450
|
end
|
451
451
|
|
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudblocks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.13
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- CloudBlocks
|
@@ -175,9 +175,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
none: false
|
177
177
|
requirements:
|
178
|
-
- - ! '
|
178
|
+
- - ! '>='
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version:
|
180
|
+
version: '0'
|
181
181
|
requirements: []
|
182
182
|
rubyforge_project:
|
183
183
|
rubygems_version: 1.8.24
|