aboutsummaryrefslogtreecommitdiffstats
path: root/testing/knot-resolver/knot-resolver.initd
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-10-02 20:57:00 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-10-02 20:57:44 +0200
commita75feeec3757b022d7666c1d1f9489d5531b0c7e (patch)
treef4f253cbc6b26d6ae4c6a530ead2cc10d37d3166 /testing/knot-resolver/knot-resolver.initd
parentc1530a4a6b2beae6294f038befd5eb67c6f3b2f6 (diff)
downloadaports-a75feeec3757b022d7666c1d1f9489d5531b0c7e.tar.bz2
aports-a75feeec3757b022d7666c1d1f9489d5531b0c7e.tar.xz
testing/knot-resolver: new aport
https://www.knot-resolver.cz/ A minimalistic caching resolver implementation
Diffstat (limited to 'testing/knot-resolver/knot-resolver.initd')
-rw-r--r--testing/knot-resolver/knot-resolver.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/testing/knot-resolver/knot-resolver.initd b/testing/knot-resolver/knot-resolver.initd
new file mode 100644
index 0000000000..7a4ef61eaf
--- /dev/null
+++ b/testing/knot-resolver/knot-resolver.initd
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+
+: ${config:="/etc/knot-resolver/config"}
+: ${cachedir:="/var/cache/knot-resolver"}
+: ${keyfile:="/var/lib/knot-resolver/root.keys"}
+: ${logfile:="/var/log/knot-resolver.log"}
+
+command="/usr/sbin/kresd"
+# Note: Do not change forks=1, it's buggy.
+command_args="--config=$config --keyfile=$keyfile --forks=1 $cachedir"
+command_background="yes"
+pidfile="/run/$RC_SVCNAME.pid"
+start_stop_daemon_args="
+ --chdir=$cachedir
+ --stdout=$logfile
+ --stderr=$logfile"
+required_files="$config"
+
+depend() {
+ need net
+}
+
+start_pre() {
+ checkpath -d -m 750 -o kresd:kresd "$cachedir"
+}