Reformatted inline, not sure why it was originally attached as a
binary file.. argh..

---

diff --git a/net/vnstat/files/vnstat.init b/net/vnstat/files/vnstat.init
index fab1f34..802e60b 100644
--- a/net/vnstat/files/vnstat.init
+++ b/net/vnstat/files/vnstat.init
@@ -65,13 +65,18 @@ start() {
        config_load vnstat
        config_foreach init_ifaces vnstat

-       /usr/sbin/vnstatd -d
+       SERVICE_PID_FILE="${pid}"
+       service_start /usr/sbin/vnstatd -d
 }

 stop() {
        local pid="$(vnstat_option PidFile)"
-       [ -n "$pid" ] && {
-               service_kill vnstatd "$pid"
-               rm -f "$pid"
+
+       [ -n "$pid" ] || {
+               echo "Error: No PidFile set in vnstat.conf" >&2
+               exit 1
        }
+
+       SERVICE_PID_FILE="${pid}"
+       service_stop /usr/sbin/vnstatd
 }


On Sat, Jan 12, 2013 at 6:15 PM, Joe Roback <openwrt-de...@roback.cc> wrote:
> This is just a simple patch to update vnstatd to use the latest
> service functions. I didn't see a specific maintainer in the Makefile,
> so can someone please apply this? Thanks.
>
> Signed-off-by: Joe Roback <openwrt-de...@roback.cc>
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to