diff options
author | Martin Rusko <martin.rusko@gmail.com> | 2019-01-17 00:28:38 +0100 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2019-02-05 10:34:45 +0000 |
commit | 0ffbcc6e5d2c475218afcdb0e94e9424d298bf16 (patch) | |
tree | 2076a4f3dd7ac073d220a94fb53e6621799db6d6 /testing | |
parent | 577effd994c839d52e25599610f9666df808d9ed (diff) | |
download | aports-0ffbcc6e5d2c475218afcdb0e94e9424d298bf16.tar.bz2 aports-0ffbcc6e5d2c475218afcdb0e94e9424d298bf16.tar.xz |
testing/minidyndns: new aport
https://github.com/arkanis/minidyndns
A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs
Changes v2 -> v3:
- default minidyndns_opts are set in the initd script
- stop() function in the initd script has been replaced with 'stopsig'
variable
- bumped release
Diffstat (limited to 'testing')
-rw-r--r-- | testing/minidyndns/APKBUILD | 48 | ||||
-rw-r--r-- | testing/minidyndns/minidyndns.confd | 5 | ||||
-rw-r--r-- | testing/minidyndns/minidyndns.initd | 25 |
3 files changed, 78 insertions, 0 deletions
diff --git a/testing/minidyndns/APKBUILD b/testing/minidyndns/APKBUILD new file mode 100644 index 0000000000..374cd9a310 --- /dev/null +++ b/testing/minidyndns/APKBUILD @@ -0,0 +1,48 @@ +# Contributor: Martin Rusko <martin.rusko@gmail.com> +# Maintainer: Martin Rusko <martin.rusko@gmail.com> +pkgname=minidyndns +pkgver=1.1.4 +pkgrel=2 +pkgdesc="A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs" +url="https://github.com/arkanis/minidyndns" +arch="noarch" +license="MIT" +depends="ruby ruby-etc" +makedepends="" +options="!check" # there is no testing suite at the moment +install="" +subpackages="$pkgname-doc $pkgname-openrc" +source="minidyndns-$pkgver.tar.gz::https://github.com/arkanis/minidyndns/archive/v$pkgver.tar.gz" +builddir="$srcdir/$pkgname-$pkgver" + +package() { + cd "$builddir" + + install -Dm755 "$srcdir"/../minidyndns.initd \ + "$pkgdir"/etc/init.d/minidyndns + install -Dm644 "$srcdir"/../minidyndns.confd \ + "$pkgdir"/etc/conf.d/minidyndns + + install -Dm755 "$builddir"/dns.rb \ + "$pkgdir"/usr/share/minidyndns/dns.rb + + install -Dm644 "$builddir"/config.example.yml \ + "$pkgdir"/etc/minidyndns_config.yml + + install -d -o nobody -g nogroup "$pkgdir"/var/log/minidyndns + + install -d -o nobody -g nogroup "$pkgdir"/var/lib/minidyndns + install -Dm640 -o nobody -g nogroup "$builddir"/db.example.yml \ + "$pkgdir"/var/lib/minidyndns/db.yml + + install -Dm644 "$builddir"/config.example.yml \ + "$pkgdir"/usr/share/doc/minidyndns/config.example.yml + + install -Dm644 "$builddir"/db.example.yml \ + "$pkgdir"/usr/share/doc/minidyndns/db.example.yml + + install -Dm644 "$builddir"/README.md \ + "$pkgdir"/usr/share/doc/minidyndns/README.md +} + +sha512sums="523e53e1a937b4d3f36eb1666444fd9024b6c059c6b145be5d725670c24fc3b339cc75eae6dde61f62c09cb195805202440df84599d197d117f0cb575d6d4f6b minidyndns-1.1.4.tar.gz" diff --git a/testing/minidyndns/minidyndns.confd b/testing/minidyndns/minidyndns.confd new file mode 100644 index 0000000000..fbf8517772 --- /dev/null +++ b/testing/minidyndns/minidyndns.confd @@ -0,0 +1,5 @@ +# +# Specify daemon options here. +# + +minidyndns_opts="" diff --git a/testing/minidyndns/minidyndns.initd b/testing/minidyndns/minidyndns.initd new file mode 100644 index 0000000000..e92da233e6 --- /dev/null +++ b/testing/minidyndns/minidyndns.initd @@ -0,0 +1,25 @@ +#!/sbin/openrc-run + +_logdir="/var/log/${RC_SVCNAME}" +command="ruby /usr/share/minidyndns/dns.rb" +command_args="${minidyndns_opts:="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"}" +command_background="yes" + +description_reload="Reloading configuration" +extra_started_commands="reload" + +start_stop_daemon_args="--stdout $_logdir/access.log --stderr $_logdir/error.log" +stopsig="SIGINT" +pidfile="/run/${RC_SVCNAME}.pid" + +depend() { + need net + after firewall +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --exec "$command" \ + --pidfile "$pidfile" --signal USR1 + eend $? +} |