File tree 1 file changed +30
-9
lines changed
1 file changed +30
-9
lines changed Original file line number Diff line number Diff line change 10
10
# processname: newrelic-daemon
11
11
# config: /etc/newrelic/newrelic.cfg
12
12
#
13
+ # ## BEGIN INIT INFO
14
+ # Provides: newrelic-daemon
15
+ # Required-Start: $all
16
+ # Required-Stop:
17
+ # Default-Start: 2 3 4 5
18
+ # Default-Stop: 0 1 6
19
+ # Description: The New Relic Daemon is used by the New Relic PHP Agent to communicate
20
+ # with the New Relic Backend
21
+ # ## END INIT INFO
13
22
14
23
LANG=C
15
24
NAME=newrelic-daemon
@@ -18,7 +27,11 @@ DESC="New Relic Daemon"
18
27
#
19
28
# Source function library.
20
29
#
21
- . /etc/init.d/functions
30
+ has_initd_functions=0
31
+ if [ -f /etc/init.d/functions ]; then
32
+ . /etc/init.d/functions
33
+ has_initd_functions=1
34
+ fi
22
35
23
36
ulimit -n 2048 > /dev/null 2>&1
24
37
@@ -223,14 +236,18 @@ EOF
223
236
224
237
if running ; then
225
238
if [ -z " ${NR_SILENT} " -a -z " ${SILENT} " ]; then
226
- success
227
- echo
239
+ if [ $has_initd_functions -eq 1 ]; then
240
+ success
241
+ echo
242
+ fi
228
243
fi
229
244
return 0
230
245
else
231
246
if [ -z " ${NR_SILENT} " -a -z " ${SILENT} " ]; then
232
- failure
233
- echo
247
+ if [ $has_initd_functions -eq 1 ]; then
248
+ failure
249
+ echo
250
+ fi
234
251
fi
235
252
return 1
236
253
fi
@@ -274,14 +291,18 @@ stop() {
274
291
275
292
if running ; then
276
293
if [ -z " ${NR_SILENT} " -a -z " ${SILENT} " ]; then
277
- failure
278
- echo
294
+ if [ $has_initd_functions -eq 1 ]; then
295
+ failure
296
+ echo
297
+ fi
279
298
fi
280
299
return 1
281
300
else
282
301
if [ -z " ${NR_SILENT} " -a -z " ${SILENT} " ]; then
283
- success
284
- echo
302
+ if [ $has_initd_functions -eq 1 ]; then
303
+ success
304
+ echo
305
+ fi
285
306
fi
286
307
return 0
287
308
fi
You can’t perform that action at this time.
0 commit comments