summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-dns/dnscrypt-proxy/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-dns/dnscrypt-proxy/files')
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd7
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd48
-rw-r--r--net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service20
3 files changed, 75 insertions, 0 deletions
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
new file mode 100644
index 000000000000..ceedd454b5fb
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.confd
@@ -0,0 +1,7 @@
+DNSCRYPT_LOCALIP=127.0.0.1
+DNSCRYPT_LOCALPORT=53
+DNSCRYPT_USER=dnscrypt
+DNSCRYPT_PROVIDER_NAME=2.dnscrypt-cert.opendns.com
+DNSCRYPT_PROVIDER_KEY=B735:1140:206F:225D:3E2B:D822:D7FD:691E:A1C3:3CC8:D666:8D0C:BE04:BFAB:CA43:FB79
+DNSCRYPT_RESOLVERIP=208.67.220.220
+DNSCRYPT_RESOLVERPORT=443
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
new file mode 100644
index 000000000000..3ef60f9ab8cd
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.initd
@@ -0,0 +1,48 @@
+#!/sbin/runscript
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DNSCRYPT_LOGFILE=${DNSCRYPT_LOGFILE:-/var/log/dnscrypt-proxy.log}
+
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+pidfile=${pidfile:-${rundir}/dnscrypt-proxy.pid}
+rundir=${rundir:-/var/run/dnscrypt-proxy}
+runas_user=${runas_user:-dnscrypt}
+runas_group=${runas_user:-dnscrypt}
+
+depend() {
+ use net
+ before dns
+ after logger
+}
+
+start() {
+ if [ ! -d "${rundir}" ]; then
+ mkdir "${rundir}"
+ if [ -n "${runas_user}" ]; then
+ touch ${DNSCRYPT_LOGFILE}
+ chown ${runas_user}:${runas_group} ${DNSCRYPT_LOGFILE}
+ chown -R ${runas_user}:${runas_group} "${rundir}"
+ fi
+ fi
+
+ ebegin "Starting dnscrypt-proxy"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/dnscrypt-proxy \
+ -- \
+ --pidfile=${pidfile} \
+ --logfile=${DNSCRYPT_LOGFILE} \
+ --daemonize --user=${runas_user} \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping dnscrypt-proxy"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/dnscrypt-proxy
+ eend $?
+}
diff --git a/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
new file mode 100644
index 000000000000..414c0b498c5e
--- /dev/null
+++ b/net-dns/dnscrypt-proxy/files/dnscrypt-proxy.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=A tool for securing communications between a client and a DNS resolver
+
+[Service]
+Type=forking
+PIDFile=/var/run/dnscrypt-proxy.pid
+EnvironmentFile=/etc/conf.d/dnscrypt-proxy
+ExecStartPre=/bin/rm -f /var/run/dnscrypt-proxy.pid
+ExecStart=/usr/sbin/dnscrypt-proxy --daemonize \
+ --pidfile=/var/run/dnscrypt-proxy.pid \
+ --logfile=/var/log/dnscrypt-proxy.log \
+ --local-address=${DNSCRYPT_LOCALIP}:${DNSCRYPT_LOCALPORT} \
+ --resolver-address=${DNSCRYPT_RESOLVERIP}:${DNSCRYPT_RESOLVERPORT} \
+ --provider-name=${DNSCRYPT_PROVIDER_NAME} \
+ --provider-key=${DNSCRYPT_PROVIDER_KEY} \
+ --user=${DNSCRYPT_USER}
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target