redhat_init_script_fix_exitcode branch Fixed init script for Redhat6/Centos6 to return the correct exit code from daemon modified: system/netdata-init-d.in
redhat_init_script_fix_exitcode branch Fixed init script for Redhat6/Centos6 to return the correct exit code from daemon modified: system/netdata-init-d.in
earthgecko committed
Apr 15, 2016 at 13:04 UTC
7a361ec034831060b12debf8b8ea97f2ed5b66c5
1 file changed
+8
-2
system/netdata-init-d.in
+8
-2
@@ -13,17 +13,23 @@ STOP_TIMEOUT="10"
13
14
service_start()
15
{
16
- printf "%-50s" "Starting $DAEMON..."
16
+ echo "Starting $DAEMON..."
17
daemon $DAEMON_PATH/$DAEMON $DAEMONOPTS
18
+ RETVAL=$?
19
echo
20
+ return $RETVAL
21
}
22
23
service_stop()
24
{
25
printf "%-50s" "Stopping $DAEMON..."
26
killproc -p ${PIDFILE} -d ${STOP_TIMEOUT} $DAEMON
25
- rm -f ${PIDFILE}
27
+ RETVAL=$?
28
+ if [ $RETVAL -eq 0 ]; then
29
+ rm -f ${PIDFILE}
30
+ fi
31
echo
32
+ return $RETVAL
33
}
34
35
service_status()