summaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@gmail.com>2010-10-14 10:00:25 +0000
committerLeonardo Arena <rnalrd@gmail.com>2010-10-14 10:00:43 +0000
commitd2ff64bc9d3627581614262bcccbd9d754b40e90 (patch)
tree4ae8687e01829cb534602a6c7b1a148ff65faa71 /testing
parent62beae3c1b5f7931b683229f18b707a1967e8f4b (diff)
downloadaports-d2ff64bc9d3627581614262bcccbd9d754b40e90.tar.bz2
aports-d2ff64bc9d3627581614262bcccbd9d754b40e90.tar.xz
testing/pmacct: default config added for all daemons and single init provided
Diffstat (limited to 'testing')
-rw-r--r--testing/pmacct/APKBUILD9
-rw-r--r--testing/pmacct/nfacctd.conf11
-rw-r--r--testing/pmacct/pmacct.initd16
-rw-r--r--testing/pmacct/pmacct.post-install4
-rw-r--r--testing/pmacct/sfacctd.conf11
-rw-r--r--testing/pmacct/uacctd.conf11
6 files changed, 51 insertions, 11 deletions
diff --git a/testing/pmacct/APKBUILD b/testing/pmacct/APKBUILD
index b1ac932e7..01cb2dc14 100644
--- a/testing/pmacct/APKBUILD
+++ b/testing/pmacct/APKBUILD
@@ -1,13 +1,13 @@
# Maintainer: Leonardo Arena <rnalrd@gmail.com>
pkgname=pmacct
pkgver=0.12.4
-pkgrel=2
+pkgrel=3
pkgdesc="Measure, account, classify, aggregate and export IPv4 and IPv6 traffic"
url="http://www.pmacct.net/"
license="GPL"
depends=
makedepends="libpcap-dev postgresql-dev"
-install=
+install="$pkgname.post-install"
subpackages="$pkgname-doc"
source="http://www.pmacct.net/$pkgname-$pkgver.tar.gz
pmacct.initd
@@ -41,6 +41,9 @@ package() {
install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
install -m644 -D "$srcdir"/pmacctd.conf "$pkgdir"/etc/pmacctd.conf
+ install -m644 -D "$srcdir"/nfacctd.conf "$pkgdir"/etc/nfacctd.conf
+ install -m644 -D "$srcdir"/sfacctd.conf "$pkgdir"/etc/sfacctd.conf
+ install -m644 -D "$srcdir"/uacctd.conf "$pkgdir"/etc/uacctd.conf
mkdir -p $pkgdir/usr/share/doc/pmacct/examples
mkdir -p $pkgdir/usr/share/doc/pmacct/sql
cp examples/* $pkgdir/usr/share/doc/pmacct/examples
@@ -49,6 +52,6 @@ package() {
}
md5sums="72098ff945e1ddaa77d7f0b3531fa765 pmacct-0.12.4.tar.gz
-0c494a28083003b47699aca45c5e4f1d pmacct.initd
+8ebf022a90bb795e6726fee4065bd386 pmacct.initd
394bf0687572261e90eecd70c33c8ede pmacct.confd
6ea97965b3fdfceb6b5c0ce2cbf01a92 pmacctd.conf"
diff --git a/testing/pmacct/nfacctd.conf b/testing/pmacct/nfacctd.conf
new file mode 100644
index 000000000..fe9a64ef0
--- /dev/null
+++ b/testing/pmacct/nfacctd.conf
@@ -0,0 +1,11 @@
+# Sample default config file
+
+daemonize: true
+pidfile: /var/run/pmacctd.pid
+syslog: daemon
+
+# sql_host: localhost
+# sql_passwd:pmacct
+# sql_table_version: 7
+
+# plugins: pgsql
diff --git a/testing/pmacct/pmacct.initd b/testing/pmacct/pmacct.initd
index 1985b997a..e6e6a3f65 100644
--- a/testing/pmacct/pmacct.initd
+++ b/testing/pmacct/pmacct.initd
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/pmacct/files/pmacctd-init.d,v 1.4 2009/06/01 09:48:41 pva Exp $
+# $Header: /var/www/viewcvs.gentoo.org/raw_cvs/gentoo-x86/net-analyzer/pmacct/files/$SVCNAME-init.d,v 1.4 2009/06/01 09:48:41 pva Exp $
depend() {
need net
@@ -9,22 +9,22 @@ depend() {
}
checkconfig() {
- if [ ! -e /etc/pmacctd.conf ] ; then
- eerror "You need an /etc/pmacctd.conf file to run pmacctd"
+ if [ ! -e /etc/$SVCNAME.conf ] ; then
+ eerror "You need an /etc/$SVCNAME.conf file to run $SVCNAME"
return 1
fi
}
start() {
checkconfig || return 1
- ebegin "Starting pmacctd"
- start-stop-daemon --start --pidfile /var/run/pmacctd.pid --exec /usr/sbin/pmacctd \
- -- -D -f /etc/pmacctd.conf -F /var/run/pmacctd.pid ${OPTS}
+ ebegin "Starting $SVCNAME"
+ start-stop-daemon --start --pidfile /var/run/$SVCNAME.pid --exec /usr/sbin/$SVCNAME \
+ -- -D -f /etc/$SVCNAME.conf -F /var/run/$SVCNAME.pid ${OPTS}
eend $?
}
stop() {
- ebegin "Stopping pmacctd"
- start-stop-daemon --stop --pidfile /var/run/pmacctd.pid --exec /usr/sbin/pmacctd
+ ebegin "Stopping $SVCNAME"
+ start-stop-daemon --stop --pidfile /var/run/$SVCNAME.pid --exec /usr/sbin/$SVCNAME
eend $?
}
diff --git a/testing/pmacct/pmacct.post-install b/testing/pmacct/pmacct.post-install
new file mode 100644
index 000000000..452eb6b4a
--- /dev/null
+++ b/testing/pmacct/pmacct.post-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+ln -s /etc/init.d/$pkgname /etc/init.d/nfacctd &>/dev/null
+ln -s /etc/init.d/$pkgname /etc/init.d/sfacctd &>/dev/null
+ln -s /etc/init.d/$pkgname /etc/init.d/uacctd &>/dev/null
diff --git a/testing/pmacct/sfacctd.conf b/testing/pmacct/sfacctd.conf
new file mode 100644
index 000000000..fe9a64ef0
--- /dev/null
+++ b/testing/pmacct/sfacctd.conf
@@ -0,0 +1,11 @@
+# Sample default config file
+
+daemonize: true
+pidfile: /var/run/pmacctd.pid
+syslog: daemon
+
+# sql_host: localhost
+# sql_passwd:pmacct
+# sql_table_version: 7
+
+# plugins: pgsql
diff --git a/testing/pmacct/uacctd.conf b/testing/pmacct/uacctd.conf
new file mode 100644
index 000000000..fe9a64ef0
--- /dev/null
+++ b/testing/pmacct/uacctd.conf
@@ -0,0 +1,11 @@
+# Sample default config file
+
+daemonize: true
+pidfile: /var/run/pmacctd.pid
+syslog: daemon
+
+# sql_host: localhost
+# sql_passwd:pmacct
+# sql_table_version: 7
+
+# plugins: pgsql