aboutsummaryrefslogtreecommitdiff
path: root/dns
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2014-06-05 19:30:58 +0000
committerMark Felder <feld@FreeBSD.org>2014-06-05 19:30:58 +0000
commitadbbccaeb687b9ba69da421ddb2a6af5ed9c0560 (patch)
tree17593f84279ab65c2fbbd71d094732efbb6ea0e5 /dns
parent6146d44e5ffcfd3042e9b1c4d082ebe0022f7dd4 (diff)
downloadports-adbbccaeb687b9ba69da421ddb2a6af5ed9c0560.tar.gz
ports-adbbccaeb687b9ba69da421ddb2a6af5ed9c0560.zip
Notes
Diffstat (limited to 'dns')
-rw-r--r--dns/dnscrypt-proxy/Makefile1
-rw-r--r--dns/dnscrypt-proxy/files/dnscrypt-proxy.in29
2 files changed, 15 insertions, 15 deletions
diff --git a/dns/dnscrypt-proxy/Makefile b/dns/dnscrypt-proxy/Makefile
index 41eed493f01d..f51b53c4e276 100644
--- a/dns/dnscrypt-proxy/Makefile
+++ b/dns/dnscrypt-proxy/Makefile
@@ -3,6 +3,7 @@
PORTNAME= dnscrypt-proxy
PORTVERSION= 1.4.0
+PORTREVISION= 1
CATEGORIES= dns
MASTER_SITES= http://download.dnscrypt.org/dnscrypt-proxy/ \
http://www.dns-lab.com/downloads/dnscrypt-proxy/
diff --git a/dns/dnscrypt-proxy/files/dnscrypt-proxy.in b/dns/dnscrypt-proxy/files/dnscrypt-proxy.in
index 33ef4ae31016..eeafcefaf36a 100644
--- a/dns/dnscrypt-proxy/files/dnscrypt-proxy.in
+++ b/dns/dnscrypt-proxy/files/dnscrypt-proxy.in
@@ -2,15 +2,23 @@
#
# $FreeBSD$
#
-# PROVIDE: dnscrypt-proxy
+# PROVIDE: dnscrypt_proxy
# REQUIRE: SERVERS cleanvar
# BEFORE: named
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
#
-# dnscrypt_proxy_enable="YES": Set to NO by default.
-# Set it to YES to enable dnscrypt-proxy.
+# dnscrypt_proxy_enable (bool): Set to NO by default.
+# Set to YES to enable dnscrypt-proxy.
+# dnscrypt_proxy_uid (str): Set to "_dnscrypt-proxy" by default.
+# User to switch to after starting.
+# dnscrypt_proxy_resolver (str):Set to "opendns" by default.
+# Choose a different upstream resolver.
+# dnscrypt_proxy_pidfile (str): default: "/var/run/dnscrypt-proxy.pid"
+# Location of pid file.
+# dnscrypt_proxy_logfile (str): default: "/var/log/dnscrypt-proxy.log"
+# Location of log file.
#
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
# and add the following to rc.conf:
@@ -22,26 +30,17 @@
name=dnscrypt_proxy
rcvar=dnscrypt_proxy_enable
-stop_cmd=dnscrypt_proxy_stop
-
load_rc_config ${name}
: ${dnscrypt_proxy_enable:=NO}
: ${dnscrypt_proxy_uid=_dnscrypt-proxy} # User to run daemon as
+: ${dnscrypt_proxy_resolver=opendns} # resolver to use
: ${dnscrypt_proxy_pidfile=/var/run/dnscrypt-proxy.pid} # Path to pid file
: ${dnscrypt_proxy_logfile=/var/log/dnscrypt-proxy.log} # Path to log file
-if [ -n "$dnscrypt_proxy_uid" ]; then
- dnscrypt_proxy_flags="${dnscrypt_proxy_flags} -u ${dnscrypt_proxy_uid}"
-fi
-
command=%%PREFIX%%/sbin/dnscrypt-proxy
+command_args="-d -p ${dnscrypt_proxy_pidfile} -l ${dnscrypt_proxy_logfile} -u ${dnscrypt_proxy_uid} -R ${dnscrypt_proxy_resolver}"
procname=%%PREFIX%%/sbin/dnscrypt-proxy
-
-command_args="-d -p ${dnscrypt_proxy_pidfile} -l ${dnscrypt_proxy_logfile}"
-
-dnscrypt_proxy_stop() {
- kill -KILL `cat ${pidfile}` 2> /dev/null && echo "Killed ${name}."
- }
+pidfile=${dnscrypt_proxy_pidfile}
run_rc_command "$1"