summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/vnstat/APKBUILD16
-rw-r--r--testing/vnstat/vnstat.pre-install5
-rw-r--r--testing/vnstat/vnstatd.confd7
-rw-r--r--testing/vnstat/vnstatd.initd3
4 files changed, 24 insertions, 7 deletions
diff --git a/testing/vnstat/APKBUILD b/testing/vnstat/APKBUILD
index 1c13ff810..be2e25310 100644
--- a/testing/vnstat/APKBUILD
+++ b/testing/vnstat/APKBUILD
@@ -2,15 +2,17 @@
pkgname=vnstat
pkgver=1.11
-pkgrel=0
+pkgrel=1
pkgdesc='A console-based network traffic monitor'
url='http://humdi.net/vnstat/'
arch='all'
license='GPL'
+install="$pkgname.pre-install"
makedepends='gd-dev'
subpackages="$pkgname-doc"
source="http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
- vnstatd.initd"
+ vnstatd.initd
+ vnstatd.confd"
build() {
cd "$srcdir"/$pkgname-$pkgver
@@ -21,8 +23,11 @@ package() {
cd "$srcdir"/$pkgname-$pkgver
make DESTDIR="$pkgdir" install || return 1
- install -D -m0755 "$srcdir"/vnstatd.initd "$pkgdir"/etc/init.d/vnstat \
- || return 1
+ install -D -m0755 "$srcdir"/vnstatd.initd \
+ "$pkgdir"/etc/init.d/vnstatd || return 1
+ install -D -m0644 "$srcdir"/vnstatd.confd \
+ "$pkgdir"/etc/conf.d/vnstatd || return 1
+
install -D -m0644 examples/vnstat.cron \
"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cron || return 1
install -D -m0755 examples/vnstat.cgi \
@@ -30,4 +35,5 @@ package() {
}
md5sums="a5a113f9176cd61fb954f2ba297f5fdb vnstat-1.11.tar.gz
-6c8a07d3388155c6cb23715ac8467700 vnstatd.initd"
+b439075575d307cd9373740fe59538f1 vnstatd.initd
+810205e9cd5328b4279bd9ab1b804c36 vnstatd.confd"
diff --git a/testing/vnstat/vnstat.pre-install b/testing/vnstat/vnstat.pre-install
new file mode 100644
index 000000000..4cb61f244
--- /dev/null
+++ b/testing/vnstat/vnstat.pre-install
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+addgroup -S vnstat 2>/dev/null
+adduser -S -h /var/lib/ -H -s /bin/false -D -G vnstat vnstat 2>/dev/null
+exit 0
diff --git a/testing/vnstat/vnstatd.confd b/testing/vnstat/vnstatd.confd
new file mode 100644
index 000000000..17901419a
--- /dev/null
+++ b/testing/vnstat/vnstatd.confd
@@ -0,0 +1,7 @@
+# /etc/conf.d/vnstatd: config file for /etc/init.d/vnstatd
+
+# Adjust scheduling priority on vnstatd (default: 0)
+#VNSTATD_NICELEVEL="0"
+
+# Pass extra options to vnstatd
+#VNSTATD_EXTRAOPTS="--config /etc/vnstat.conf"
diff --git a/testing/vnstat/vnstatd.initd b/testing/vnstat/vnstatd.initd
index b3f136cef..167e2cc30 100644
--- a/testing/vnstat/vnstatd.initd
+++ b/testing/vnstat/vnstatd.initd
@@ -1,7 +1,6 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-analyzer/vnstat/files/vnstatd.initd,v 1.6 2012/01/01 01:19:16 idl0r Exp $
extra_started_commands="reload"
@@ -18,7 +17,7 @@ start() {
--pidfile "${VNSTATD_PIDFILE}" \
--user vnstat --group vnstat \
--nicelevel ${VNSTATD_NICELEVEL:-0} \
- --exec /usr/bin/vnstatd -- \
+ --exec /usr/sbin/vnstatd -- \
-d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
eend $?
}