aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gdnsd
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-05-01 15:05:03 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-05-01 15:05:03 +0000
commit8ea34b27980bf3a0fd71818f0d269a5c53f647cb (patch)
treecc768d1d4413c885efe25d48a7cf86662ff50db6 /testing/gdnsd
parent00c10699b820b852bde45f6c85683ebedb43503d (diff)
downloadaports-8ea34b27980bf3a0fd71818f0d269a5c53f647cb.tar.bz2
aports-8ea34b27980bf3a0fd71818f0d269a5c53f647cb.tar.xz
testing/gdnsd: add very basic init.d script
Diffstat (limited to 'testing/gdnsd')
-rw-r--r--testing/gdnsd/APKBUILD10
-rwxr-xr-xtesting/gdnsd/gdnsd.initd18
2 files changed, 25 insertions, 3 deletions
diff --git a/testing/gdnsd/APKBUILD b/testing/gdnsd/APKBUILD
index c89aae670b..6da9d6caad 100644
--- a/testing/gdnsd/APKBUILD
+++ b/testing/gdnsd/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gdnsd
pkgver=1.6.2
-pkgrel=1
+pkgrel=2
pkgdesc="Geographic Authoritative DNS server"
url="http://code.google.com/p/gdnsd/"
arch="all"
@@ -12,7 +12,8 @@ depends_dev=""
makedepends="libev-dev libcap-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc"
-source="http://gdnsd.googlecode.com/files/gdnsd-$pkgver.tar.xz"
+source="http://gdnsd.googlecode.com/files/gdnsd-$pkgver.tar.xz
+ gdnsd.initd"
_builddir="$srcdir"/gdnsd-$pkgver
prepare() {
@@ -33,6 +34,8 @@ build() {
--enable-fast-install \
|| return 1
make || return 1
+ install -Dm755 "$srcdir"/gdnsd.initd "$pkgdir"/etc/init.d/gdnsd \
+ || return 1
}
package() {
@@ -42,4 +45,5 @@ package() {
"$pkgdir"/usr/lib/gdnsd/*.la
}
-md5sums="082f874d24cdc7073950ed6294f8d39b gdnsd-1.6.2.tar.xz"
+md5sums="082f874d24cdc7073950ed6294f8d39b gdnsd-1.6.2.tar.xz
+dad20779adfb4b85b57b45c7c903a636 gdnsd.initd"
diff --git a/testing/gdnsd/gdnsd.initd b/testing/gdnsd/gdnsd.initd
new file mode 100755
index 0000000000..e11a73d1d6
--- /dev/null
+++ b/testing/gdnsd/gdnsd.initd
@@ -0,0 +1,18 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting dnsd"
+ start-stop-daemon --start --exec /usr/sbin/dnsd -- -d $DNSD_OPTS
+ eend $?
+}
+
+stop () {
+ ebegin "Stopping dnsd"
+ start-stop-daemon --stop --exec /usr/sbin/dnsd
+ eend $?
+}