summaryrefslogtreecommitdiff
path: root/net-dns/getdns/files/stubby.initd-r2
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-dns/getdns/files/stubby.initd-r2
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-dns/getdns/files/stubby.initd-r2')
-rwxr-xr-xnet-dns/getdns/files/stubby.initd-r228
1 files changed, 28 insertions, 0 deletions
diff --git a/net-dns/getdns/files/stubby.initd-r2 b/net-dns/getdns/files/stubby.initd-r2
new file mode 100755
index 000000000000..69e76c0acfdf
--- /dev/null
+++ b/net-dns/getdns/files/stubby.initd-r2
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+stubby_opts="-C ${STUBBY_CONFIG_FILE:-/etc/stubby/stubby.yml} -v ${STUBBY_LOGLEVEL:-5}"
+command="capsh"
+command_args="--inh=cap_net_bind_service --user=stubby -- -c '/usr/bin/stubby -g ${stubby_opts} >>/var/log/stubby.log 2>&1'"
+pidfile="/run/stubby.pid"
+name="DNS Privacy Daemon"
+
+depend()
+{
+ provide dns
+ need localmount net
+ after bootmisc
+ use logger
+}
+
+start_pre()
+{
+ checkpath -f -m 0644 -o stubby:stubby /run/stubby.pid
+ checkpath -f -m 0644 -o stubby:stubby /var/log/stubby.log
+}
+
+stop_post()
+{
+ [ -f /run/stubby.pid ] && rm /run/stubby.pid
+}