cloudblocks 0.0.12h → 0.0.12i

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/bin/cb-agent +12 -6
  2. metadata +1 -1
data/bin/cb-agent CHANGED
@@ -34,14 +34,14 @@ public
34
34
 
35
35
  def start
36
36
  begin
37
- @log.info "Starting the CloudBlocks Agent"
38
- puts "Starting the CloudBlocks Agent"
37
+ @log.info "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
42
42
  #check if the process is actually running
43
43
  if pid_process_running?(pid)
44
- warn "The CloudBlocks Agent is already running. Use stop command to stop it or --help for more info"
44
+ warn "The CloudBlocks Agent was already running. Use stop command to stop it or --help for more info"
45
45
  exit -1
46
46
  else
47
47
  File.delete(@pid_full)
@@ -71,16 +71,21 @@ def start
71
71
  Process.kill('TERM', pid)
72
72
  warn "Cannot start the CloudBlocks Agent: #{exc.message}"
73
73
  end
74
+
75
+ puts "The CloudBlocks Agent has been started"
74
76
  else
75
77
  run
76
78
  end
77
79
 
80
+
78
81
  exit 0
79
82
  end
80
83
 
81
84
  def stop
82
85
  pid = get_pid
83
- @log.info "Stopping the CloudBlocks Agent"
86
+ @log.info "Trying to stop the CloudBlocks Agent"
87
+ puts "Trying to stop the CloudBlocks Agent"
88
+
84
89
  begin
85
90
  @quartz.status(2, @version, plugin_meta_data)
86
91
  EM.stop
@@ -93,9 +98,9 @@ def stop
93
98
  rescue
94
99
  end
95
100
  File.delete(@pid_full)
96
- puts "The CloudBlocks Agent was stopped"
101
+ puts "The CloudBlocks Agent has been stopped"
97
102
  else
98
- warn "Did nothing - The CloudBlocks Agent was not running"
103
+ warn "Nothing to do - the CloudBlocks Agent was not running"
99
104
  exit -1
100
105
  end
101
106
  end
@@ -122,6 +127,7 @@ def unregister
122
127
  @agent_id = ""
123
128
  @quartz.unregister(@agent_id)
124
129
  save_config
130
+ puts "Unregistered"
125
131
  end
126
132
 
127
133
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cloudblocks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12h
4
+ version: 0.0.12i
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: