aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-21 14:29:26 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-21 14:29:26 +0000
commit5d9620463b748f38927b1080a39093cdfb929254 (patch)
treeda5090bda26ac3104a13ae22cc047aaf50deb078
parent36d09d5b6774ec30ffb5f996fd849cf42bcf7012 (diff)
downloadalpine_aports-5d9620463b748f38927b1080a39093cdfb929254.tar.bz2
alpine_aports-5d9620463b748f38927b1080a39093cdfb929254.tar.xz
alpine_aports-5d9620463b748f38927b1080a39093cdfb929254.zip
testing/rrdcollect: simplify init.d
-rw-r--r--testing/rrdcollect/APKBUILD14
-rw-r--r--testing/rrdcollect/rrdcollect.confd3
-rwxr-xr-xtesting/rrdcollect/rrdcollect.initd21
3 files changed, 6 insertions, 32 deletions
diff --git a/testing/rrdcollect/APKBUILD b/testing/rrdcollect/APKBUILD
index 688ccdd374..56e6499aa1 100644
--- a/testing/rrdcollect/APKBUILD
+++ b/testing/rrdcollect/APKBUILD
@@ -2,7 +2,7 @@
2# Maintainer: Michael Mason <ms13sp@gmail.com> 2# Maintainer: Michael Mason <ms13sp@gmail.com>
3pkgname=rrdcollect 3pkgname=rrdcollect
4pkgver=0.2.9 4pkgver=0.2.9
5pkgrel=1 5pkgrel=2
6pkgdesc="Read system statistical data and feed it to RRDtool" 6pkgdesc="Read system statistical data and feed it to RRDtool"
7url="http://rrdcollect.sourceforge.net/" 7url="http://rrdcollect.sourceforge.net/"
8arch="all" 8arch="all"
@@ -12,9 +12,8 @@ makedepends="libpcap-dev"
12install= 12install=
13subpackages="$pkgname-doc" 13subpackages="$pkgname-doc"
14source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz 14source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
15rrdcollect.conf.patch 15 rrdcollect.conf.patch
16rrdcollect.confd 16 rrdcollect.initd"
17rrdcollect.initd"
18 17
19_builddir="$srcdir/$pkgname-$pkgver" 18_builddir="$srcdir/$pkgname-$pkgver"
20prepare() { 19prepare() {
@@ -44,12 +43,11 @@ package() {
44 cd "$_builddir" 43 cd "$_builddir"
45 make DESTDIR="$pkgdir" install 44 make DESTDIR="$pkgdir" install
46 45
47 install -m755 -D "$srcdir"/rrdcollect.initd "$pkgdir"/etc/init.d/rrdcollect || return 1 46 install -m755 -D "$srcdir"/rrdcollect.initd \
48 install -m644 -D "$srcdir"/rrdcollect.confd "$pkgdir"/etc/conf.d/rrdcollect || return 1 47 "$pkgdir"/etc/init.d/rrdcollect || return 1
49 install -m755 -d "$pkgdir"/var/lib/rrdtool || return 1 48 install -m755 -d "$pkgdir"/var/lib/rrdtool || return 1
50} 49}
51 50
52md5sums="1e94eb0f8d55ebf0f042c10baebc2d3d rrdcollect-0.2.9.tar.gz 51md5sums="1e94eb0f8d55ebf0f042c10baebc2d3d rrdcollect-0.2.9.tar.gz
53e09d7a588e31c9ecfc44fd1747ad732b rrdcollect.conf.patch 52e09d7a588e31c9ecfc44fd1747ad732b rrdcollect.conf.patch
54b3f64ec3e4578fb4de9614c20c6ea232 rrdcollect.confd 53d5a892939ee11351f6bbbf9218694f8b rrdcollect.initd"
55edef974fb5a27279f9347d9eacda4a26 rrdcollect.initd"
diff --git a/testing/rrdcollect/rrdcollect.confd b/testing/rrdcollect/rrdcollect.confd
deleted file mode 100644
index eb7e4fa828..0000000000
--- a/testing/rrdcollect/rrdcollect.confd
+++ /dev/null
@@ -1,3 +0,0 @@
1# rrdcollect params suitable for running as a daemon
2
3RRD_OPTS=""
diff --git a/testing/rrdcollect/rrdcollect.initd b/testing/rrdcollect/rrdcollect.initd
index da566116e1..883e574e11 100755
--- a/testing/rrdcollect/rrdcollect.initd
+++ b/testing/rrdcollect/rrdcollect.initd
@@ -3,25 +3,4 @@
3description="rrdcollect daemon" 3description="rrdcollect daemon"
4pidfile="/var/run/${RC_SVCNAME}.pid" 4pidfile="/var/run/${RC_SVCNAME}.pid"
5command="/usr/sbin/rrdcollect" 5command="/usr/sbin/rrdcollect"
6runas="root"
7 6
8start_pre() {
9 checkpath --directory --owner ${runas}:${runas} --mode 775 ${pidfile%/*}
10}
11
12start() {
13 ebegin "Starting ${RC_SVCNAME}"
14 start-stop-daemon --start \
15 --user ${runas} \
16 --pidfile ${pidfile} \
17 --exec ${command} \
18 -- ${RRD_OPTS}
19 eend $?
20}
21
22stop() {
23 ebegin "Stopping ${RC_SVCNAME}"
24 start-stop-daemon --stop \
25 --pidfile ${pidfile}
26 eend $?
27}