summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorearthgecko <gary.wilson@of-networks.co.uk>2016-04-15 13:04:15 +0100
committerearthgecko <gary.wilson@of-networks.co.uk>2016-04-15 13:04:15 +0100
commit7a361ec034831060b12debf8b8ea97f2ed5b66c5 (patch)
treeda3136600e0ad9676eb573a09cb4de044687c630 /system
parent51aa8e32233ba86129f762dec0a25053da4a5d85 (diff)
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
Diffstat (limited to 'system')
-rwxr-xr-xsystem/netdata-init-d.in10
1 files changed, 8 insertions, 2 deletions
diff --git a/system/netdata-init-d.in b/system/netdata-init-d.in
index 8c46433693..c317d10211 100755
--- a/system/netdata-init-d.in
+++ b/system/netdata-init-d.in
@@ -13,17 +13,23 @@ STOP_TIMEOUT="10"
service_start()
{
- printf "%-50s" "Starting $DAEMON..."
+ echo "Starting $DAEMON..."
daemon $DAEMON_PATH/$DAEMON $DAEMONOPTS
+ RETVAL=$?
echo
+ return $RETVAL
}
service_stop()
{
printf "%-50s" "Stopping $DAEMON..."
killproc -p ${PIDFILE} -d ${STOP_TIMEOUT} $DAEMON
- rm -f ${PIDFILE}
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ rm -f ${PIDFILE}
+ fi
echo
+ return $RETVAL
}
service_status()