~alpine/aports

5 2

[alpine-aports] [PATCH] testing/minidyndns: new aport

Details
Message ID
<20181230111722.21006-1-martin.rusko@gmail.com>
Sender timestamp
1546168642
DKIM signature
missing
Download raw message
Patch: +97 -0
https://github.com/arkanis/minidyndns
A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs
---
 testing/minidyndns/APKBUILD                   | 55 +++++++++++++++++++
 .../minidyndns-openrc.pre-deinstall           |  6 ++
 testing/minidyndns/minidyndns.confd           |  5 ++
 testing/minidyndns/minidyndns.initd           | 31 +++++++++++
 4 files changed, 97 insertions(+)
 create mode 100644 testing/minidyndns/APKBUILD
 create mode 100644 testing/minidyndns/minidyndns-openrc.pre-deinstall
 create mode 100644 testing/minidyndns/minidyndns.confd
 create mode 100644 testing/minidyndns/minidyndns.initd

diff --git a/testing/minidyndns/APKBUILD b/testing/minidyndns/APKBUILD
new file mode 100644
index 0000000000..ccb1d974e1
--- /dev/null
+++ b/testing/minidyndns/APKBUILD
@@ -0,0 +1,55 @@
# Contributor: Martin Rusko <martin.rusko@gmail.com>
# Maintainer: Martin Rusko <martin.rusko@gmail.com>
pkgname=minidyndns
pkgver=1.1.4
pkgrel=0
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=""
install="$pkgname-openrc.pre-deinstall"
subpackages="$pkgname-doc $pkgname-openrc"
source="minidyndns-$pkgver.tar.gz::https://github.com/arkanis/minidyndns/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
}

check() {
	cd "$builddir"
}

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-openrc.pre-deinstall b/testing/minidyndns/minidyndns-openrc.pre-deinstall
new file mode 100644
index 0000000000..712bc37943
--- /dev/null
+++ b/testing/minidyndns/minidyndns-openrc.pre-deinstall
@@ -0,0 +1,6 @@
#!/bin/sh

rc-service --ifexists minidyndns stop
rc-update --all del minidyndns

exit 0
diff --git a/testing/minidyndns/minidyndns.confd b/testing/minidyndns/minidyndns.confd
new file mode 100644
index 0000000000..3cf5d10be2
--- /dev/null
+++ b/testing/minidyndns/minidyndns.confd
@@ -0,0 +1,5 @@
#
# Specify daemon options here.
#

minidyndns_opts="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"
diff --git a/testing/minidyndns/minidyndns.initd b/testing/minidyndns/minidyndns.initd
new file mode 100644
index 0000000000..4a84ea07be
--- /dev/null
+++ b/testing/minidyndns/minidyndns.initd
@@ -0,0 +1,31 @@
#!/sbin/openrc-run

_logdir="/var/log/${RC_SVCNAME}"
command="ruby /usr/share/minidyndns/dns.rb"
command_args="$minidyndns_opts"
command_background="yes"

description_reload="Reloading configuration"
extra_started_commands="reload"

start_stop_daemon_args="--stdout $_logdir/access.log --stderr $_logdir/error.log"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
	after firewall
}

stop() {
	ebegin "Stopping ${RC_SVCNAME}"
	start-stop-daemon --stop --exec "$command" \
		--pidfile "$pidfile" --signal INT
	eend $?
}

reload() {
	ebegin "Reloading ${RC_SVCNAME}"
	start-stop-daemon --exec "$command" \
		--pidfile "$pidfile" --signal USR1
	eend $?
}
-- 
2.18.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Leonardo Arena <rnalrd@gmail.com>
Details
Message ID
<CAGG_d8DQfTXEB4BMu-Z=ChMv3F57kzRbwu62b=y3ognwatc4yQ@mail.gmail.com>
In-Reply-To
<20181230111722.21006-1-martin.rusko@gmail.com> (view parent)
Sender timestamp
1546255078
DKIM signature
missing
Download raw message
Hi,

thank you for the contribution. Please see some comments below.

On Sun, Dec 30, 2018 at 12:17 PM Martin Rusko <martin.rusko@gmail.com>
wrote:

> https://github.com/arkanis/minidyndns
> A simple no fuss DNS server with built-in HTTP/HTTPS interface to update
> IPs
> ---
>  testing/minidyndns/APKBUILD                   | 55 +++++++++++++++++++
>  .../minidyndns-openrc.pre-deinstall           |  6 ++
>  testing/minidyndns/minidyndns.confd           |  5 ++
>  testing/minidyndns/minidyndns.initd           | 31 +++++++++++
>  4 files changed, 97 insertions(+)
>  create mode 100644 testing/minidyndns/APKBUILD
>  create mode 100644 testing/minidyndns/minidyndns-openrc.pre-deinstall
>  create mode 100644 testing/minidyndns/minidyndns.confd
>  create mode 100644 testing/minidyndns/minidyndns.initd
>
> diff --git a/testing/minidyndns/APKBUILD b/testing/minidyndns/APKBUILD
> new file mode 100644
> index 0000000000..ccb1d974e1
> --- /dev/null
> +++ b/testing/minidyndns/APKBUILD
> @@ -0,0 +1,55 @@
> +# Contributor: Martin Rusko <martin.rusko@gmail.com>
> +# Maintainer: Martin Rusko <martin.rusko@gmail.com>
> +pkgname=minidyndns
> +pkgver=1.1.4
> +pkgrel=0
> +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=""
> +install="$pkgname-openrc.pre-deinstall"
> +subpackages="$pkgname-doc $pkgname-openrc"
> +source="minidyndns-$pkgver.tar.gz::
> https://github.com/arkanis/minidyndns/archive/v$pkgver.tar.gz"
> +builddir="$srcdir/$pkgname-$pkgver"
> +
> +build() {
> +       cd "$builddir"
> +}
> +
> +check() {
> +       cd "$builddir"
> +}
> +
>


Since check() does effectly nothing here you should add "options=!check"
and perhaps adding a comment next to it there is no test suite.



> +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-openrc.pre-deinstall
> b/testing/minidyndns/minidyndns-openrc.pre-deinstall
> new file mode 100644
> index 0000000000..712bc37943
> --- /dev/null
> +++ b/testing/minidyndns/minidyndns-openrc.pre-deinstall
> @@ -0,0 +1,6 @@
> +#!/bin/sh
> +
> +rc-service --ifexists minidyndns stop
> +rc-update --all del minidyndns
> +
> +exit 0
>


I saw your email on alpine-devel. So far there is no package trying to stop
the daemon before uninstalling and I think we would like to keep it that
way.
We don't try to be smart in our packages like other distros. We prefer to
keep things simple and we assume that the administrator knows what he is
doing. :)



> diff --git a/testing/minidyndns/minidyndns.confd
> b/testing/minidyndns/minidyndns.confd
> new file mode 100644
> index 0000000000..3cf5d10be2
> --- /dev/null
> +++ b/testing/minidyndns/minidyndns.confd
> @@ -0,0 +1,5 @@
> +#
> +# Specify daemon options here.
> +#
> +
> +minidyndns_opts="--config /etc/minidyndns_config.yml --db
> /var/lib/minidyndns/db.yml"
>


Since these are default values, may be you can add those to the init script
itself and leave the conf file for customizations.

: ${minidyndns_opts:="--config /etc/minidyndns_config.yml --db
/var/lib/minidyndns/db.yml"}


 Thanks!

/eo
Details
Message ID
<CAMYYbY4qkQX0FrA-q+LbE_Xna=g7HP_1z0Z8JU+W2WM0XfNjmQ@mail.gmail.com>
In-Reply-To
<CAGG_d8DQfTXEB4BMu-Z=ChMv3F57kzRbwu62b=y3ognwatc4yQ@mail.gmail.com> (view parent)
Sender timestamp
1546267755
DKIM signature
missing
Download raw message
Many thanks for your comments. I will update it accordingly. I will
send it again as new patch. There is just one thing I'm not certain
about, see below.

On Mon, Dec 31, 2018 at 12:18 PM Leonardo Arena <rnalrd@gmail.com> wrote:
>>
>> diff --git a/testing/minidyndns/minidyndns.confd b/testing/minidyndns/minidyndns.confd
>> new file mode 100644
>> index 0000000000..3cf5d10be2
>> --- /dev/null
>> +++ b/testing/minidyndns/minidyndns.confd
>> @@ -0,0 +1,5 @@
>> +#
>> +# Specify daemon options here.
>> +#
>> +
>> +minidyndns_opts="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"
>
>
>
> Since these are default values, may be you can add those to the init script itself and leave the conf file for customizations.
>
> : ${minidyndns_opts:="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"}
>
Will I not stand in a way of someone who will want to change the
location of these files? The administrator will need to edit both the
file in conf.d and the one init.d script as well. I feel it's better
to keep these options defined in conf.d file. If I'm overthinking it,
just say so and I will move them to init.d script.

/Martin


---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---

[alpine-aports] [PATCH v2] testing/minidyndns: new aport after review

Details
Message ID
<20190101152235.12881-1-martin.rusko@gmail.com>
In-Reply-To
<CAGG_d8DQfTXEB4BMu-Z=ChMv3F57kzRbwu62b=y3ognwatc4yQ@mail.gmail.com> (view parent)
Sender timestamp
1546356155
DKIM signature
missing
Download raw message
Patch: +84 -0
https://github.com/arkanis/minidyndns
A simple no fuss DNS server with built-in HTTP/HTTPS interface to update IPs

Changes v1 -> v2:
 - removed .pre-deinstall script stopping the daemon
 - disabled check explicitely
 - bumped release

Note: Default options from confd file were left intact if they
      need to be modified. If the consensus tripple towards
      hardcoding them in the initd script, I will prepare v3.
---
 testing/minidyndns/APKBUILD         | 48 +++++++++++++++++++++++++++++
 testing/minidyndns/minidyndns.confd |  5 +++
 testing/minidyndns/minidyndns.initd | 31 +++++++++++++++++++
 3 files changed, 84 insertions(+)
 create mode 100644 testing/minidyndns/APKBUILD
 create mode 100644 testing/minidyndns/minidyndns.confd
 create mode 100644 testing/minidyndns/minidyndns.initd

diff --git a/testing/minidyndns/APKBUILD b/testing/minidyndns/APKBUILD
new file mode 100644
index 0000000000..978337d8b3
--- /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=1
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..3cf5d10be2
--- /dev/null
+++ b/testing/minidyndns/minidyndns.confd
@@ -0,0 +1,5 @@
#
# Specify daemon options here.
#

minidyndns_opts="--config /etc/minidyndns_config.yml --db /var/lib/minidyndns/db.yml"
diff --git a/testing/minidyndns/minidyndns.initd b/testing/minidyndns/minidyndns.initd
new file mode 100644
index 0000000000..4a84ea07be
--- /dev/null
+++ b/testing/minidyndns/minidyndns.initd
@@ -0,0 +1,31 @@
#!/sbin/openrc-run

_logdir="/var/log/${RC_SVCNAME}"
command="ruby /usr/share/minidyndns/dns.rb"
command_args="$minidyndns_opts"
command_background="yes"

description_reload="Reloading configuration"
extra_started_commands="reload"

start_stop_daemon_args="--stdout $_logdir/access.log --stderr $_logdir/error.log"
pidfile="/run/${RC_SVCNAME}.pid"

depend() {
	need net
	after firewall
}

stop() {
	ebegin "Stopping ${RC_SVCNAME}"
	start-stop-daemon --stop --exec "$command" \
		--pidfile "$pidfile" --signal INT
	eend $?
}

reload() {
	ebegin "Reloading ${RC_SVCNAME}"
	start-stop-daemon --exec "$command" \
		--pidfile "$pidfile" --signal USR1
	eend $?
}
-- 
2.18.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Leonardo Arena <rnalrd@gmail.com>
Details
Message ID
<CAGG_d8Dj7q69056c_XBiFnmWTOgvUNpB-_9wNQpG-xvNh8U_cw@mail.gmail.com>
In-Reply-To
<CAMYYbY4qkQX0FrA-q+LbE_Xna=g7HP_1z0Z8JU+W2WM0XfNjmQ@mail.gmail.com> (view parent)
Sender timestamp
1546442012
DKIM signature
missing
Download raw message
Hi,

sorry for the late reply.

On Mon, Dec 31, 2018 at 3:49 PM Martin Rusko <martin.rusko@gmail.com> wrote:

> Many thanks for your comments. I will update it accordingly. I will
> send it again as new patch. There is just one thing I'm not certain
> about, see below.
>
> On Mon, Dec 31, 2018 at 12:18 PM Leonardo Arena <rnalrd@gmail.com> wrote:
> >>
> >> diff --git a/testing/minidyndns/minidyndns.confd
> b/testing/minidyndns/minidyndns.confd
> >> new file mode 100644
> >> index 0000000000..3cf5d10be2
> >> --- /dev/null
> >> +++ b/testing/minidyndns/minidyndns.confd
> >> @@ -0,0 +1,5 @@
> >> +#
> >> +# Specify daemon options here.
> >> +#
> >> +
> >> +minidyndns_opts="--config /etc/minidyndns_config.yml --db
> /var/lib/minidyndns/db.yml"
> >
> >
> >
> > Since these are default values, may be you can add those to the init
> script itself and leave the conf file for customizations.
> >
> > : ${minidyndns_opts:="--config /etc/minidyndns_config.yml --db
> /var/lib/minidyndns/db.yml"}
> >
> Will I not stand in a way of someone who will want to change the
> location of these files? The administrator will need to edit both the
> file in conf.d and the one init.d script as well. I feel it's better
> to keep these options defined in conf.d file. If I'm overthinking it,
> just say so and I will move them to init.d script.
>
>
My suggestion above does hardcode the location of the configuration files.
If $minidyndns_opts is not set in conf.d/minidyndns, it sets the values to
those specified into init.d/minidyndns_opts.
The administrator does not need to touch the init.d at all to move the
configuration files somewhere else.

Thanks!

/eo

[alpine-aports] [PATCH v3] testing/minidyndns: new aport

Details
Message ID
<20190116232838.32763-1-martin.rusko@gmail.com>
In-Reply-To
<CAGG_d8Dj7q69056c_XBiFnmWTOgvUNpB-_9wNQpG-xvNh8U_cw@mail.gmail.com> (view parent)
Sender timestamp
1547681318
DKIM signature
missing
Download raw message
Patch: +78 -0
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

---
 testing/minidyndns/APKBUILD         | 48 +++++++++++++++++++++++++++++
 testing/minidyndns/minidyndns.confd |  5 +++
 testing/minidyndns/minidyndns.initd | 25 +++++++++++++++
 3 files changed, 78 insertions(+)
 create mode 100644 testing/minidyndns/APKBUILD
 create mode 100644 testing/minidyndns/minidyndns.confd
 create mode 100644 testing/minidyndns/minidyndns.initd

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 $?
}
-- 
2.18.1



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)