mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-07 05:10:20 +00:00
collectd: fix init status
Fix init status to get it works with 'service --status-all'. Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Martin Jansa
parent
438d363331
commit
f0cde44d55
@@ -146,6 +146,17 @@ d_stop() {
|
||||
return "$rc"
|
||||
}
|
||||
|
||||
# return:
|
||||
# 0 if the daemon is running
|
||||
# 3 if the daemon is stopped
|
||||
d_status(){
|
||||
if test "$USE_COLLECTDMON" == 1; then
|
||||
status $COLLECTDMON_DAEMON
|
||||
else
|
||||
status $DAEMON
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
echo -n "Starting $NAME"
|
||||
@@ -164,7 +175,7 @@ case "$1" in
|
||||
esac
|
||||
;;
|
||||
status)
|
||||
status_of_proc -p "$_PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
|
||||
d_status
|
||||
;;
|
||||
restart|force-reload)
|
||||
echo -n "Restarting $NAME"
|
||||
|
||||
Reference in New Issue
Block a user