diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-08 09:38:43 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-06-08 09:38:43 +0000 |
commit | 624542a224fe696937ec40e41c7771b03b34b20d (patch) | |
tree | 2537a0fd25c7ecbdf1bbea7c7bd3ba4547d5cf82 /testing/vnstat | |
parent | 9230ae9e6afd745a1e55174ab26635671f62be07 (diff) | |
parent | d47f73ead07e2abe6fa462b2ef2e52f8d53f9274 (diff) | |
download | aports-624542a224fe696937ec40e41c7771b03b34b20d.tar.bz2 aports-624542a224fe696937ec40e41c7771b03b34b20d.tar.xz |
Merge git://github.com/Barthalion/aports
2 new aports, 3 upgrades. Fix ipv6 support in ufw later
Diffstat (limited to 'testing/vnstat')
-rw-r--r-- | testing/vnstat/APKBUILD | 30 | ||||
-rw-r--r-- | testing/vnstat/vnstatd.initd | 37 |
2 files changed, 67 insertions, 0 deletions
diff --git a/testing/vnstat/APKBUILD b/testing/vnstat/APKBUILD new file mode 100644 index 0000000000..0ae9e742c0 --- /dev/null +++ b/testing/vnstat/APKBUILD @@ -0,0 +1,30 @@ +# Maintainer: Bartłomiej Piotrowski <nospam@bpiotrowski.pl> + +pkgname=vnstat +pkgver=1.11 +pkgrel=0 +pkgdesc='A console-based network traffic monitor' +url='http://humdi.net/vnstat/' +arch='all' +license='GPL' +makedepends='gd-dev' +subpackages="$pkgname-doc" +source="http://humdi.net/vnstat/$pkgname-$pkgver.tar.gz + vnstatd.initd" + +build() { + cd "$srcdir"/$pkgname-$pkgver + make all || return 1 +} + +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 -m0644 examples/vnstat.cron "$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cron || return 1 + install -D -m0755 examples/vnstat.cgi "$pkgdir"/usr/share/doc/vnstat/examples/vnstat.cgi || return 1 +} + +md5sums="a5a113f9176cd61fb954f2ba297f5fdb vnstat-1.11.tar.gz +6c8a07d3388155c6cb23715ac8467700 vnstatd.initd" diff --git a/testing/vnstat/vnstatd.initd b/testing/vnstat/vnstatd.initd new file mode 100644 index 0000000000..b3f136cef3 --- /dev/null +++ b/testing/vnstat/vnstatd.initd @@ -0,0 +1,37 @@ +#!/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" + +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 + start-stop-daemon --start --quiet \ + --pidfile "${VNSTATD_PIDFILE}" \ + --user vnstat --group vnstat \ + --nicelevel ${VNSTATD_NICELEVEL:-0} \ + --exec /usr/bin/vnstatd -- \ + -d ${VNSTATD_EXTRAOPTS} -p ${VNSTATD_PIDFILE} + eend $? +} + +stop() { + ebegin "Stopping vnstatd" + start-stop-daemon --stop --quiet \ + --pidfile "${VNSTATD_PIDFILE}" + eend $? +} + +reload() { + ebegin "Reloading vnstatd configuration" + kill -HUP $(< "${VNSTATD_PIDFILE}") &>/dev/null + eend $? +} |