summaryrefslogtreecommitdiff
path: root/net-proxy/dnsproxy/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-proxy/dnsproxy/files
reinit the tree, so we can have metadata
Diffstat (limited to 'net-proxy/dnsproxy/files')
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch10
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy.confd3
-rw-r--r--net-proxy/dnsproxy/files/dnsproxy.initd31
3 files changed, 44 insertions, 0 deletions
diff --git a/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch b/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch
new file mode 100644
index 000000000000..96296f5ed2d8
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy-1.16-include.patch
@@ -0,0 +1,10 @@
+--- dnsproxy.c.orig 2010-01-11 16:02:00.000000000 +0100
++++ dnsproxy.c 2010-10-27 05:07:05.000000000 +0200
+@@ -28,6 +28,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <grp.h> /* setgroups() */
+ #include <unistd.h>
+
+ #define GLOBALS 1
diff --git a/net-proxy/dnsproxy/files/dnsproxy.confd b/net-proxy/dnsproxy/files/dnsproxy.confd
new file mode 100644
index 000000000000..48f8a51e57f0
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy.confd
@@ -0,0 +1,3 @@
+# Options for dnsproxy daemon (rarely you need to change these)
+DNSPROXY_CONFFILE="/etc/dnsproxy/dnsproxy.conf"
+DNSPROXY_PIDFILE="/var/run/dnsproxy.pid"
diff --git a/net-proxy/dnsproxy/files/dnsproxy.initd b/net-proxy/dnsproxy/files/dnsproxy.initd
new file mode 100644
index 000000000000..7af2199cfab2
--- /dev/null
+++ b/net-proxy/dnsproxy/files/dnsproxy.initd
@@ -0,0 +1,31 @@
+#!/sbin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e "${DNSPROXY_CONFFILE}" ] ; then
+ eerror "You need to create and select the configuration file first."
+ eerror "An example can be found in /etc/dnsproxy/dnsproxy.conf.dist"
+ return 1
+ fi
+}
+
+start() {
+ ebegin "Starting dnsproxy"
+ checkconfig && \
+ start-stop-daemon --start --make-pidfile \
+ --quiet -b --pidfile ${DNSPROXY_PIDFILE} \
+ --exec /usr/sbin/dnsproxy -- -c "${DNSPROXY_CONFFILE}"
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnsproxy"
+ start-stop-daemon --stop --quiet \
+ --pidfile ${DNSPROXY_PIDFILE}
+ eend $?
+}