aboutsummaryrefslogtreecommitdiffstats
path: root/community/vnstat
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-22 00:51:45 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-08-23 12:02:01 -0300
commit40e0af22ae58a73fa9c5916034e6b050cc742a3b (patch)
treebb641a56716507b3c786d0a51e9666b01615d04a /community/vnstat
parent2d7c70b86c8df5ea60b943ddb95f2cbe3930d438 (diff)
downloadaports-40e0af22ae58a73fa9c5916034e6b050cc742a3b.tar.bz2
aports-40e0af22ae58a73fa9c5916034e6b050cc742a3b.tar.xz
community/vnstat: upgrade to 2.4
Diffstat (limited to 'community/vnstat')
-rw-r--r--community/vnstat/APKBUILD16
-rw-r--r--community/vnstat/vnstatd.initd35
2 files changed, 20 insertions, 31 deletions
diff --git a/community/vnstat/APKBUILD b/community/vnstat/APKBUILD
index a2c8074b07..916749c16f 100644
--- a/community/vnstat/APKBUILD
+++ b/community/vnstat/APKBUILD
@@ -1,22 +1,20 @@
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=vnstat
-pkgver=1.18
+pkgver=2.4
pkgrel=0
pkgdesc="Console-based network traffic monitor"
url="http://humdi.net/vnstat"
arch="all"
license="GPL-2.0-or-later"
install="$pkgname.pre-install"
-makedepends="gd-dev"
-subpackages="$pkgname-doc"
-source="http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz
+makedepends="sqlite-dev"
+subpackages="$pkgname-doc $pkgname-openrc"
+source="http://humdi.net/vnstat/vnstat-$pkgver.tar.gz
vnstatd.initd
vnstatd.confd"
-builddir="$srcdir/vnstat-$pkgver"
build() {
- cd "$builddir"
./configure \
--prefix=/usr \
--sysconfdir=/etc \
@@ -26,8 +24,6 @@ build() {
}
package() {
- cd "$builddir"
-
make DESTDIR="$pkgdir" install
install -D -m0755 "$srcdir"/vnstatd.initd \
@@ -39,6 +35,6 @@ package() {
"$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi
}
-sha512sums="4f9f08a57586bc57ede3d66802ee977c69b5f76ab42aa36e942e8d827dfce806dfc04916646fac01f57b026742a639fc5f7395b141a1c03ad11a1f977d02aa68 vnstat-1.18.tar.gz
-cc3183b8d42eff1e0a876420612dd8892ba5ac10810e7de7ca1076eb5e5867145a0d7e605773f39157e91da29aa68ae5c350d120f60292578fcaba44603b2b92 vnstatd.initd
+sha512sums="e2f23b375a6afcd9e51770769c741d3a5fc139aec22e535bc98da09e4a6677a0c820fb04727a79f23569be29f031e9ee897b6d569146c42ed917f5f83399b7b6 vnstat-2.4.tar.gz
+2aba0dd07cd347b711e9aa1becf170fe24dfafe67adc972b70c90767cb23d930e77b705f24186e20581716b12bec4f86762546c126f6cff4d9d23a2048c40a63 vnstatd.initd
d645817913d5b52e928561b3d6a0e869d8ae5db81b97af91c1ebfc6a8cd2df666c1653e6dc5f91c0a890033a89692f77eaf081c1cae5590446c69a70ea263946 vnstatd.confd"
diff --git a/community/vnstat/vnstatd.initd b/community/vnstat/vnstatd.initd
index e206fb263d..6d8c89a022 100644
--- a/community/vnstat/vnstatd.initd
+++ b/community/vnstat/vnstatd.initd
@@ -1,6 +1,17 @@
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
+supervisor=supervise-daemon
+
+name=vnstat
+description="Daemon based database updating for vnStat"
+
+command=/usr/sbin/vnstatd
+command_args="$VNSTATD_EXTRAOPTS"
+command_args_foreground="--nodaemon"
+
+command_user=vnstat:vnstat
+supervise_daemon_args="--nicelevel ${VNSTATD_NICELEVEL:-0}"
extra_started_commands="reload"
@@ -8,30 +19,12 @@ depend() {
use net
}
-VNSTATD_PIDFILE="${VNSTATD_PIDFILE:-/var/run/vnstatd/vnstatd.pid}"
-
-start() {
- ebegin "Starting vnstatd"
- checkpath -q -d -m 755 -o vnstat:vnstat /var/run/vnstatd
- checkpath -q -d -m 755 -o vnstat:vnstat /var/lib/vnstat
- start-stop-daemon --start --quiet \
- --pidfile "${VNSTATD_PIDFILE}" \
- --user vnstat --group vnstat \
- --nicelevel ${VNSTATD_NICELEVEL:-0} \
- --exec /usr/sbin/vnstatd -- \
- -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE}
- eend $?
-}
-
-stop() {
- ebegin "Stopping vnstatd"
- start-stop-daemon --stop --quiet \
- --pidfile "${VNSTATD_PIDFILE}"
- eend $?
+pre_start() {
+ checkpath -q -d -m 755 -o $command_user /var/lib/vnstat
}
reload() {
ebegin "Reloading vnstatd configuration"
- kill -HUP $(< "${VNSTATD_PIDFILE}") &>/dev/null
+ $supervisor $RC_SVCNAME --signal HUP
eend $?
}