flapjack 0.6.54 → 0.6.55

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/flapjack CHANGED
@@ -82,6 +82,7 @@ when "start"
82
82
 
83
83
  if runner.daemon_running?
84
84
  puts "Flapjack is already running."
85
+ exit 1
85
86
  else
86
87
  print "Flapjack starting..."
87
88
  runner.execute(:daemonize => daemonize) {
@@ -100,6 +101,7 @@ when "stop"
100
101
  puts " done."
101
102
  else
102
103
  puts "Flapjack is not running."
104
+ exit 1
103
105
  end
104
106
 
105
107
  when "restart"
@@ -128,6 +130,7 @@ when "reload"
128
130
  end
129
131
  else
130
132
  puts "Flapjack is not running daemonized."
133
+ exit 1
131
134
  end
132
135
 
133
136
  when "status"
@@ -146,5 +149,6 @@ else
146
149
  else
147
150
  puts "Unknown command provided: '#{ARGV[0]}'"
148
151
  end
152
+ exit 1
149
153
 
150
154
  end
@@ -177,6 +177,7 @@ case ARGV[0]
177
177
  when "start"
178
178
  if runner.daemon_running?
179
179
  puts "#{exe} is already running."
180
+ exit 1
180
181
  else
181
182
  print "#{exe} starting..."
182
183
  runner.execute(:daemonize => daemonize) {
@@ -192,6 +193,7 @@ when "stop"
192
193
  puts " done."
193
194
  else
194
195
  puts "#{exe} is not running."
196
+ exit 1
195
197
  end
196
198
 
197
199
  when "restart"
@@ -215,6 +217,7 @@ else
215
217
  else
216
218
  puts "Unknown command provided: '#{ARGV[0]}'"
217
219
  end
220
+ exit 1
218
221
 
219
222
  end
220
223
 
data/bin/flapper CHANGED
@@ -95,6 +95,7 @@ case ARGV[0]
95
95
  when "start"
96
96
  if runner.daemon_running?
97
97
  puts "#{exe} is already running."
98
+ exit 1
98
99
  else
99
100
  print "#{exe} starting..."
100
101
  runner.execute(:daemonize => daemonize) {
@@ -110,6 +111,7 @@ when "stop"
110
111
  puts " done."
111
112
  else
112
113
  puts "#{exe} is not running."
114
+ exit 1
113
115
  end
114
116
 
115
117
  when "restart"
@@ -133,5 +135,6 @@ else
133
135
  else
134
136
  puts "Unknown command provided: '#{ARGV[0]}'"
135
137
  end
138
+ exit 1
136
139
 
137
140
  end
@@ -28,15 +28,20 @@ fi
28
28
  case "$1" in
29
29
  start)
30
30
  rbenv shell 1.9.3-p125
31
- flapjack --config /etc/flapjack/flapjack-config.yaml --daemonize
31
+ flapjack start --config /etc/flapjack/flapjack-config.yaml --daemonize
32
32
  RETVAL=$?
33
33
  ;;
34
34
  stop)
35
- kill `cat /var/run/flapjack/flapjack.pid`
36
- # FIXME: make this more robust, preferably use daemons foo
37
- # or at least wait until the flapjack process has exited before exiting
35
+ flapjack stop --config /etc/flapjack/flapjack-config.yaml
38
36
  RETVAL=$?
39
37
  ;;
38
+ restart)
39
+ flapjack restart --config /etc/flapjack/flapjack-config.yaml
40
+ RETVAL=$?
41
+ ;;
42
+ reload)
43
+ flapjack reload --config /etc/flapjack/flapjack-config.yaml
44
+ RETVAL=$?
40
45
  *)
41
46
  echo "Usage: flapjack {start|stop}"
42
47
  RETVAL=1
@@ -20,15 +20,15 @@ export FLAPJACK_ENV="production"
20
20
 
21
21
  NAGIOS_PERFDATA_FIFO="/var/cache/nagios3/event_stream.fifo"
22
22
 
23
- if [ ! $(which flapjack-nagios-receiver-control) ]; then
24
- echo "Error: flapjack-nagios-receiver-control isn't in PATH."
23
+ if [ ! $(which flapjack-nagios-receiver) ]; then
24
+ echo "Error: flapjack-nagios-receiver isn't in PATH."
25
25
  echo "Refusing to do anything!"
26
26
  exit 1
27
27
  fi
28
28
 
29
29
  # Evaluate command
30
30
 
31
- rbenv shell 1.9.3-p125 && flapjack-nagios-receiver-control $1 -- --config /etc/flapjack/flapjack-config.yaml --fifo ${NAGIOS_PERFDATA_FIFO}
31
+ rbenv shell 1.9.3-p125 && flapjack-nagios-receiver $1 --config /etc/flapjack/flapjack-config.yaml --fifo ${NAGIOS_PERFDATA_FIFO}
32
32
 
33
33
  RETVAL=$?
34
34
  exit $RETVAL
@@ -13,15 +13,14 @@ fi
13
13
  # Default return value
14
14
  RETVAL=0
15
15
 
16
- if [ ! $(which flapper-control) ]; then
17
- echo "Error: flapper-control isn't in PATH."
16
+ if [ ! $(which flapper) ]; then
17
+ echo "Error: flapper isn't in PATH."
18
18
  echo "Refusing to do anything!"
19
19
  exit 1
20
20
  fi
21
21
 
22
22
  # Evaluate command
23
-
24
- rbenv shell 1.9.3-p125 && flapper-control $1
23
+ rbenv shell 1.9.3-p125 && flapper $1
25
24
  RETVAL=$?
26
25
 
27
26
  exit $RETVAL
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  module Flapjack
4
- VERSION = "0.6.54"
4
+ VERSION = "0.6.55"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flapjack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.54
4
+ version: 0.6.55
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -330,10 +330,6 @@ files:
330
330
  - bin/flapjack-populator
331
331
  - bin/flapper
332
332
  - config.ru
333
- - dist/etc/default/flapjack-notifier
334
- - dist/etc/default/flapjack-workers
335
- - dist/etc/flapjack/flapjack-notifier.conf.example
336
- - dist/etc/flapjack/recipients.conf.example
337
333
  - dist/etc/init.d/flapjack
338
334
  - dist/etc/init.d/flapjack-nagios-receiver
339
335
  - dist/etc/init.d/flapper
@@ -469,7 +465,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
469
465
  version: '0'
470
466
  segments:
471
467
  - 0
472
- hash: -3074875956567986285
468
+ hash: -1136373001526107045
473
469
  required_rubygems_version: !ruby/object:Gem::Requirement
474
470
  none: false
475
471
  requirements:
@@ -478,7 +474,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
478
474
  version: '0'
479
475
  segments:
480
476
  - 0
481
- hash: -3074875956567986285
477
+ hash: -1136373001526107045
482
478
  requirements: []
483
479
  rubyforge_project:
484
480
  rubygems_version: 1.8.23
@@ -1,15 +0,0 @@
1
- # Defaults for flapjack-notifier initscript
2
- # sourced by /etc/init.d/flapjack-notifier
3
-
4
- # set enabled to 1 if you want the init script to start flapjack-notifier
5
- ENABLED=1
6
-
7
- # recipients file
8
- RECIPIENTS=/etc/flapjack/recipients.yaml
9
-
10
- # address beanstalkd is bound to
11
- BEANSTALKD_ADDR=localhost
12
-
13
- # port beanstalk is listening on
14
- BEANSTALKD_PORT=11300
15
-
@@ -1,17 +0,0 @@
1
- # Defaults for flapjack-workers initscript
2
- # sourced by /etc/init.d/flapjack-workers
3
-
4
- # set enabled to 1 if you want the init script to start flapjack-workers
5
- ENABLED=1
6
-
7
- # address beanstalkd is bound to
8
- BEANSTALKD_ADDR=localhost
9
-
10
- # port beanstalk is listening on
11
- BEANSTALKD_PORT=11300
12
-
13
- # number of workers to spin up
14
- WORKERS=5
15
-
16
- # location of the checks
17
- CHECKS_DIRECTORY=/usr/lib/flapjack/checks
@@ -1,34 +0,0 @@
1
- # top level
2
- [notifier]
3
- notifier-directories = /usr/lib/flapjack/notifiers/ /path/to/my/notifiers
4
- notifiers = mailer, xmpp
5
-
6
- # persistence layers
7
- [persistence]
8
- backend = data_mapper
9
- uri = sqlite3:///tmp/flapjack.db
10
-
11
- # couchdb backend
12
- #[persistence]
13
- # backend = couchdb
14
- # version = 0.8
15
- # host = localhost
16
- # port = 5984
17
- # database = flapjack_production
18
-
19
- # message transports
20
- [transport]
21
- backend = beanstalkd
22
- host = localhost
23
- port = 11300
24
-
25
- # notifiers
26
- [mailer-notifier]
27
- from_address = foo@bar.com
28
-
29
- [xmpp-notifier]
30
- jid = foo@bar.com
31
- password = barfoo
32
-
33
-
34
-
@@ -1,14 +0,0 @@
1
- # example recipients.conf
2
-
3
- [John Doe]
4
- email = johndoe@example.org
5
- jid = john@example.org
6
- phone = +61 400 111 222
7
- pager = 61400111222
8
-
9
- [Jane Doe]
10
- email = janedoe@example.org
11
- jid = jane@example.org
12
- phone = +61 222 333 111
13
- pager = 61222333111
14
-