From a62ff02b8dec94a8153b42677c3795dcb93a5e7b Mon Sep 17 00:00:00 2001 From: Hannu Nyman Date: Wed, 3 Feb 2016 18:51:17 +0200 Subject: [PATCH] collectd: use procd Change collectd to use procd for startup. Signed-off-by: Hannu Nyman --- utils/collectd/files/collectd.init | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/utils/collectd/files/collectd.init b/utils/collectd/files/collectd.init index 8204c38ac..727e020aa 100644 --- a/utils/collectd/files/collectd.init +++ b/utils/collectd/files/collectd.init @@ -1,15 +1,13 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006-2011 OpenWrt.org +# Copyright (C) 2006-2016 OpenWrt.org START=80 -SERVICE_USE_PID=1 +USE_PROCD=1 -start() { - mkdir -m 0755 -p /var/lib/collectd - service_start /usr/sbin/collectd +start_service() { + procd_open_instance + procd_set_param command /usr/sbin/collectd -f + procd_close_instance } -stop() { - service_stop /usr/sbin/collectd -}