nagira 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/History.md +6 -0
  3. data/config/nagira.init_d +13 -8
  4. data/version.txt +1 -1
  5. metadata +45 -46
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e09ff94870be35304fdfb687e5fc6047f95b6ca
4
- data.tar.gz: b03938f74c6fbba6618249cd189f0f5346ce562e
3
+ metadata.gz: 20560fc1f4e70236c329b38652fdea2b00ce46f3
4
+ data.tar.gz: 2c8692b72f9fa4506c79521224050bec53ba4b2b
5
5
  SHA512:
6
- metadata.gz: b94672b041d55420637a30975f0b8e9ad5781b2f84ad6b47906d0257d9ddfe265615e49e4d150bf409236d783d9ba7fde62ef95101155a658a569e77af869c6d
7
- data.tar.gz: 59059bccbcdbb2a6b103bef6f8b4d6c7a37540039ad949eece266e12b4dc6607566cb62cc855cf27c6a68b536b063494a3b0637631e31d1a8ed00e90d0349e61
6
+ metadata.gz: 101a57dbca279d02b6e5ebb5ba6bd74e50b83cc1d8b5c2146e859d8e954c6dbe99a5d7181bcf4a7955aec7690dd497907af10565705da5de14ab625674caffa5
7
+ data.tar.gz: 6d98671c732d5fadc9f30ce124420918b7901ab110735e3fc7edc59d9a98dbdd8d199476a12db870b929625ef0b706bbcdd0c2d8c904cf412eb9dbabd0890006
data/History.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### v0.4.2
2
+ * Fri Oct 9 2015 -- Dmytro Kovalov
3
+ - init.d script fixes
4
+ - Fix for not detecting PID of the running Nagira, when ruby bibnary
5
+ is like ruby1.9.1
6
+ - Sanity checks for nagios user and log directory
1
7
  ### v0.4.1
2
8
  * Wed Dec 26 2014 -- Dmytro Kovalov (birthday release, NAgira tuns 4 years today :)
3
9
  - Added puma support, puma is default now
@@ -1,15 +1,15 @@
1
1
  #!/bin/bash
2
2
  ### BEGIN INIT INFO
3
3
  # Provides: nagira
4
- # Required-Start:
5
- # Required-Stop:
4
+ # Required-Start:
5
+ # Required-Stop:
6
6
  # Default-Start: 2 3 4 5
7
7
  # Default-Stop: 0 1 6
8
8
  # Short-Description: Nagira API application for Nagios
9
9
  # Description: Controls Nagira API application for Nagios
10
10
  ### END INIT INFO
11
11
  #
12
- # nagira:
12
+ # nagira:
13
13
  #
14
14
  # Version: 1
15
15
  #
@@ -55,17 +55,22 @@ NAGIRA_LOG=${NAGIRA_LOG:-/var/log/nagios/nagira.log}
55
55
  export RACK_ENV NAGIRA_LOG NAGIRA_USER RVM_STRING
56
56
 
57
57
  get_pid () {
58
- # ps -U ${
59
- # ps -C ruby -o pid,comm,cmd
60
- #echo $(ps axo pid,command | awk '$2 ~ /ruby/ && $3 ~ /nagira/ {print $1}')
61
- echo $(ps -C ruby -o pid,cmd | awk '$2 ~ /^\/usr.*bin\/nagira *$/ {print $1}')
58
+ echo $(ps -C nagira,ruby,ruby1.9.1,ruby1.9.3,ruby2.0,ruby2.1,ruby2.2 -o pid,cmd | \
59
+ awk '$0 ~ /bin\/nagira *$/ {print $1}')
62
60
  }
63
61
 
64
62
 
65
63
  start() {
66
64
  [ ! -z "$(get_pid)" ] && { status; return 1; }
65
+
66
+ getent passwd ${NAGIRA_USER} > /dev/null 2>&1 || \
67
+ { echo "User ${NAGIRA_USER} does not exist. Please fix."; exit 1; }
68
+
69
+ test -w $(dirname ${NAGIRA_LOG}) || \
70
+ { echo "Directory or file ${NAGIRA_LOG} is not writable."; exit 1; }
71
+
67
72
  echo -n "Starting ${process_name}: "
68
- su - $NAGIRA_USER -s /bin/bash -c "source $DEFAULTS ; $RVM_STRING ; RACK_ENV=$RACK_ENV nagira&" > $NAGIRA_LOG 2>&1
73
+ su - $NAGIRA_USER -s /bin/bash -c "source $DEFAULTS ; $RVM_STRING ; RACK_ENV=$RACK_ENV nagira&" > $NAGIRA_LOG 2>&1
69
74
  sleep 5
70
75
  process=$(get_pid)
71
76
  if [ -z "$process" ]; then
@@ -1 +1 @@
1
- 0.4.1
1
+ 0.4.2
metadata CHANGED
@@ -1,285 +1,285 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nagira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmytro Kovalov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-26 00:00:00.000000000 Z
11
+ date: 2015-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: json
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.8'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.8'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.1'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '3.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sherlock_os
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0.0'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-core
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '3.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.1'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-expectations
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '3.1'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '3.1'
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rspec-mocks
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ~>
115
+ - - "~>"
116
116
  - !ruby/object:Gem::Version
117
117
  version: '3.1'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ~>
122
+ - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '3.1'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: ruby-nagios
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ~>
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
131
  version: '0.2'
132
- - - '>='
132
+ - - ">="
133
133
  - !ruby/object:Gem::Version
134
134
  version: 0.2.2
135
135
  type: :runtime
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - ~>
139
+ - - "~>"
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0.2'
142
- - - '>='
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
144
  version: 0.2.2
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: sinatra
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
- - - ~>
149
+ - - "~>"
150
150
  - !ruby/object:Gem::Version
151
151
  version: '1.4'
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
- - - ~>
156
+ - - "~>"
157
157
  - !ruby/object:Gem::Version
158
158
  version: '1.4'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: sinatra-contrib
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
- - - ~>
163
+ - - "~>"
164
164
  - !ruby/object:Gem::Version
165
165
  version: '1.4'
166
166
  type: :runtime
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
- - - ~>
170
+ - - "~>"
171
171
  - !ruby/object:Gem::Version
172
172
  version: '1.4'
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: rake
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
- - - ~>
177
+ - - "~>"
178
178
  - !ruby/object:Gem::Version
179
179
  version: '10.1'
180
180
  type: :runtime
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - ~>
184
+ - - "~>"
185
185
  - !ruby/object:Gem::Version
186
186
  version: '10.1'
187
187
  - !ruby/object:Gem::Dependency
188
188
  name: puma
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
- - - ~>
191
+ - - "~>"
192
192
  - !ruby/object:Gem::Version
193
193
  version: '2.1'
194
194
  type: :runtime
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
- - - ~>
198
+ - - "~>"
199
199
  - !ruby/object:Gem::Version
200
200
  version: '2.1'
201
201
  - !ruby/object:Gem::Dependency
202
202
  name: growl
203
203
  requirement: !ruby/object:Gem::Requirement
204
204
  requirements:
205
- - - ~>
205
+ - - "~>"
206
206
  - !ruby/object:Gem::Version
207
207
  version: '1'
208
208
  type: :development
209
209
  prerelease: false
210
210
  version_requirements: !ruby/object:Gem::Requirement
211
211
  requirements:
212
- - - ~>
212
+ - - "~>"
213
213
  - !ruby/object:Gem::Version
214
214
  version: '1'
215
215
  - !ruby/object:Gem::Dependency
216
216
  name: pry
217
217
  requirement: !ruby/object:Gem::Requirement
218
218
  requirements:
219
- - - ~>
219
+ - - "~>"
220
220
  - !ruby/object:Gem::Version
221
221
  version: '0.10'
222
222
  type: :development
223
223
  prerelease: false
224
224
  version_requirements: !ruby/object:Gem::Requirement
225
225
  requirements:
226
- - - ~>
226
+ - - "~>"
227
227
  - !ruby/object:Gem::Version
228
228
  version: '0.10'
229
229
  - !ruby/object:Gem::Dependency
230
230
  name: guard-brakeman
231
231
  requirement: !ruby/object:Gem::Requirement
232
232
  requirements:
233
- - - ~>
233
+ - - "~>"
234
234
  - !ruby/object:Gem::Version
235
235
  version: '0.5'
236
236
  type: :development
237
237
  prerelease: false
238
238
  version_requirements: !ruby/object:Gem::Requirement
239
239
  requirements:
240
- - - ~>
240
+ - - "~>"
241
241
  - !ruby/object:Gem::Version
242
242
  version: '0.5'
243
243
  - !ruby/object:Gem::Dependency
244
244
  name: guard-rspec
245
245
  requirement: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - ~>
247
+ - - "~>"
248
248
  - !ruby/object:Gem::Version
249
249
  version: '4'
250
250
  type: :development
251
251
  prerelease: false
252
252
  version_requirements: !ruby/object:Gem::Requirement
253
253
  requirements:
254
- - - ~>
254
+ - - "~>"
255
255
  - !ruby/object:Gem::Version
256
256
  version: '4'
257
257
  - !ruby/object:Gem::Dependency
258
258
  name: yard
259
259
  requirement: !ruby/object:Gem::Requirement
260
260
  requirements:
261
- - - ~>
261
+ - - "~>"
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0.8'
264
264
  type: :development
265
265
  prerelease: false
266
266
  version_requirements: !ruby/object:Gem::Requirement
267
267
  requirements:
268
- - - ~>
268
+ - - "~>"
269
269
  - !ruby/object:Gem::Version
270
270
  version: '0.8'
271
271
  - !ruby/object:Gem::Dependency
272
272
  name: redcarpet
273
273
  requirement: !ruby/object:Gem::Requirement
274
274
  requirements:
275
- - - ~>
275
+ - - "~>"
276
276
  - !ruby/object:Gem::Version
277
277
  version: '3.0'
278
278
  type: :development
279
279
  prerelease: false
280
280
  version_requirements: !ruby/object:Gem::Requirement
281
281
  requirements:
282
- - - ~>
282
+ - - "~>"
283
283
  - !ruby/object:Gem::Version
284
284
  version: '3.0'
285
285
  description: |2+
@@ -366,19 +366,18 @@ require_paths:
366
366
  - lib
367
367
  required_ruby_version: !ruby/object:Gem::Requirement
368
368
  requirements:
369
- - - '>='
369
+ - - ">="
370
370
  - !ruby/object:Gem::Version
371
371
  version: 1.9.1
372
372
  required_rubygems_version: !ruby/object:Gem::Requirement
373
373
  requirements:
374
- - - '>='
374
+ - - ">="
375
375
  - !ruby/object:Gem::Version
376
376
  version: '0'
377
377
  requirements: []
378
378
  rubyforge_project:
379
- rubygems_version: 2.2.2
379
+ rubygems_version: 2.4.6
380
380
  signing_key:
381
381
  specification_version: 4
382
382
  summary: 'Nagira : Nagios RESTful API'
383
383
  test_files: []
384
- has_rdoc: