From 1f2a63775b774b037006b87073e4e4b4138ee828 Mon Sep 17 00:00:00 2001 From: nico Date: Wed, 9 Nov 2011 19:49:01 +0000 Subject: [PATCH] packages/pmacct: use new service functions git-svn-id: svn://svn.openwrt.org/openwrt/packages@28890 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- admin/pmacct/Makefile | 2 +- admin/pmacct/files/nfacctd.init | 17 +++++++++-------- admin/pmacct/files/pmacctd.init | 17 +++++++++-------- admin/pmacct/files/sfacctd.init | 17 +++++++++-------- admin/pmacct/files/uacctd.init | 17 +++++++++-------- 5 files changed, 37 insertions(+), 33 deletions(-) diff --git a/admin/pmacct/Makefile b/admin/pmacct/Makefile index cc17ca453..638fa637d 100644 --- a/admin/pmacct/Makefile +++ b/admin/pmacct/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pmacct PKG_VERSION:=0.12.5 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.pmacct.net/ diff --git a/admin/pmacct/files/nfacctd.init b/admin/pmacct/files/nfacctd.init index e1113571c..66b902191 100644 --- a/admin/pmacct/files/nfacctd.init +++ b/admin/pmacct/files/nfacctd.init @@ -1,18 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -BIN=nfacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid +SERVICE_USE_PID=1 + +PROG="nfacctd" +DEFAULT="/etc/default/$PROG" +COMMAND="/usr/sbin/$PROG" start() { [ -f $DEFAULT ] && . $DEFAULT - mkdir -p $RUN_D - $BIN $OPTIONS + service_start $COMMAND $OPTIONS } stop() { - [ -f $PID_F ] && kill -INT $(cat $PID_F) + service_stop $COMMAND } diff --git a/admin/pmacct/files/pmacctd.init b/admin/pmacct/files/pmacctd.init index a57c5817b..3d75bcfa9 100644 --- a/admin/pmacct/files/pmacctd.init +++ b/admin/pmacct/files/pmacctd.init @@ -1,18 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -BIN=pmacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid +SERVICE_USE_PID=1 + +PROG="pmacctd" +DEFAULT="/etc/default/$PROG" +COMMAND="/usr/sbin/$PROG" start() { [ -f $DEFAULT ] && . $DEFAULT - mkdir -p $RUN_D - $BIN $OPTIONS + service_start $COMMAND $OPTIONS } stop() { - [ -f $PID_F ] && kill -INT $(cat $PID_F) + service_stop $COMMAND } diff --git a/admin/pmacct/files/sfacctd.init b/admin/pmacct/files/sfacctd.init index 0a2fd4662..16468d478 100644 --- a/admin/pmacct/files/sfacctd.init +++ b/admin/pmacct/files/sfacctd.init @@ -1,18 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -BIN=sfacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid +SERVICE_USE_PID=1 + +PROG="sfacctd" +DEFAULT="/etc/default/$PROG" +COMMAND="/usr/sbin/$PROG" start() { [ -f $DEFAULT ] && . $DEFAULT - mkdir -p $RUN_D - $BIN $OPTIONS + service_start $COMMAND $OPTIONS } stop() { - [ -f $PID_F ] && kill -INT $(cat $PID_F) + service_stop $COMMAND } diff --git a/admin/pmacct/files/uacctd.init b/admin/pmacct/files/uacctd.init index a4239ad34..39b27baf3 100644 --- a/admin/pmacct/files/uacctd.init +++ b/admin/pmacct/files/uacctd.init @@ -1,18 +1,19 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006 OpenWrt.org +# Copyright (C) 2006-2011 OpenWrt.org + START=50 -BIN=uacctd -DEFAULT=/etc/default/$BIN -RUN_D=/var/run -PID_F=$RUN_D/$BIN.pid +SERVICE_USE_PID=1 + +PROG="uacctd" +DEFAULT="/etc/default/$PROG" +COMMAND="/usr/sbin/$PROG" start() { [ -f $DEFAULT ] && . $DEFAULT - mkdir -p $RUN_D - $BIN $OPTIONS + service_start $COMMAND $OPTIONS } stop() { - [ -f $PID_F ] && kill -INT $(cat $PID_F) + service_stop $COMMAND }