mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-05-09 05:49:23 +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 "$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
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting $NAME"
|
echo -n "Starting $NAME"
|
||||||
@@ -164,7 +175,7 @@ case "$1" in
|
|||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status_of_proc -p "$_PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $?
|
d_status
|
||||||
;;
|
;;
|
||||||
restart|force-reload)
|
restart|force-reload)
|
||||||
echo -n "Restarting $NAME"
|
echo -n "Restarting $NAME"
|
||||||
|
|||||||
Reference in New Issue
Block a user