collectd: log stderr output
authorYousong Zhou <yszhou4tech@gmail.com>
Fri, 9 Aug 2019 03:10:08 +0000 (03:10 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Sat, 10 Aug 2019 01:52:22 +0000 (09:52 +0800)
Collectd without log type plugin loaded will write log lines to stderr.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
utils/collectd/files/collectd.init

index 7b9c4623e43bf7572f7ded6b881e08a2ff5aa9de..71993f60120217cd79e4ecdde87141a8bbc5bcf2 100644 (file)
@@ -199,16 +199,14 @@ process_config() {
 }
 
 start_service() {
+       process_config
+
        procd_open_instance
        procd_set_param command /usr/sbin/collectd
        procd_append_param command -C "$COLLECTD_CONF"
-       procd_append_param command -f # don't daemonize, procd will handle that for us
+       procd_append_param command -f # don't daemonize
        procd_set_param nice "$NICEPRIO"
-
-       process_config
-
-       # set auto respawn behavior
+       procd_set_param stderr 1
        procd_set_param respawn
        procd_close_instance
 }
-