Fixed init script for Redhat6/Centos6 to return the correct exit code from
daemon
modified:
system/netdata-init-d.in
- printf "%-50s" "Starting $DAEMON..."
+ echo "Starting $DAEMON..."
daemon $DAEMON_PATH/$DAEMON $DAEMONOPTS
daemon $DAEMON_PATH/$DAEMON $DAEMONOPTS
}
service_stop()
{
printf "%-50s" "Stopping $DAEMON..."
killproc -p ${PIDFILE} -d ${STOP_TIMEOUT} $DAEMON
}
service_stop()
{
printf "%-50s" "Stopping $DAEMON..."
killproc -p ${PIDFILE} -d ${STOP_TIMEOUT} $DAEMON
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ]; then
+ rm -f ${PIDFILE}
+ fi