diff options
Diffstat (limited to 'meta-oe/recipes-extended/collectd')
-rw-r--r-- | meta-oe/recipes-extended/collectd/collectd/collectd.init | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/meta-oe/recipes-extended/collectd/collectd/collectd.init b/meta-oe/recipes-extended/collectd/collectd/collectd.init index abdb194a3..95f5f73c6 100644 --- a/meta-oe/recipes-extended/collectd/collectd/collectd.init +++ b/meta-oe/recipes-extended/collectd/collectd/collectd.init | |||
@@ -146,6 +146,17 @@ d_stop() { | |||
146 | return "$rc" | 146 | return "$rc" |
147 | } | 147 | } |
148 | 148 | ||
149 | # return: | ||
150 | # 0 if the daemon is running | ||
151 | # 3 if the daemon is stopped | ||
152 | d_status(){ | ||
153 | if test "$USE_COLLECTDMON" == 1; then | ||
154 | status $COLLECTDMON_DAEMON | ||
155 | else | ||
156 | status $DAEMON | ||
157 | fi | ||
158 | } | ||
159 | |||
149 | case "$1" in | 160 | case "$1" in |
150 | start) | 161 | start) |
151 | echo -n "Starting $NAME" | 162 | echo -n "Starting $NAME" |
@@ -164,7 +175,7 @@ case "$1" in | |||
164 | esac | 175 | esac |
165 | ;; | 176 | ;; |
166 | status) | 177 | status) |
167 | status_of_proc -p "$_PIDFILE" "$DAEMON" "$NAME" && exit 0 || exit $? | 178 | d_status |
168 | ;; | 179 | ;; |
169 | restart|force-reload) | 180 | restart|force-reload) |
170 | echo -n "Restarting $NAME" | 181 | echo -n "Restarting $NAME" |