diff options
author | nia <nia@pkgsrc.org> | 2018-10-01 15:05:48 +0000 |
---|---|---|
committer | nia <nia@pkgsrc.org> | 2018-10-01 15:05:48 +0000 |
commit | 63c0f34d78aab0c0591407a4c0d5c93cb65a2e22 (patch) | |
tree | a4d100ec30cc0b645809fa9cc114b23382bb03f8 | |
parent | ddd32a2437bd670e64d8481af31dcf944a11c60c (diff) | |
download | pkgsrc-63c0f34d78aab0c0591407a4c0d5c93cb65a2e22.tar.gz |
dnscrypt-proxy2: Add rc script / default configuration file.
-rw-r--r-- | net/dnscrypt-proxy2/Makefile | 11 | ||||
-rw-r--r-- | net/dnscrypt-proxy2/PLIST | 3 | ||||
-rw-r--r-- | net/dnscrypt-proxy2/files/dnscrypt_proxy.sh | 29 | ||||
-rw-r--r-- | net/dnscrypt-proxy2/files/dnscrypt_proxy.toml | 23 |
4 files changed, 64 insertions, 2 deletions
diff --git a/net/dnscrypt-proxy2/Makefile b/net/dnscrypt-proxy2/Makefile index ff671982ba6..bd93a0e990a 100644 --- a/net/dnscrypt-proxy2/Makefile +++ b/net/dnscrypt-proxy2/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2018/08/05 12:28:06 nia Exp $ +# $NetBSD: Makefile,v 1.3 2018/10/01 15:05:48 nia Exp $ PKGNAME= dnscrypt-proxy2-2.0.16 DISTNAME= dnscrypt-proxy-${PKGVERSION_NOREV} +PKGREVISION= 1 CATEGORIES= net security MASTER_SITES= ${MASTER_SITE_GITHUB:=jedisct1/} GITHUB_PROJECT= dnscrypt-proxy @@ -18,8 +19,16 @@ USE_TOOLS+= pax GO_SRCPATH= github.com/jedisct1/dnscrypt-proxy/ GO_DIST_BASE= ${DISTNAME} +EGDIR= ${PREFIX}/share/examples/dnscrypt-proxy + +RCD_SCRIPTS= dnscrypt_proxy +CONF_FILES= ${EGDIR}/dnscrypt_proxy.toml ${PKG_SYSCONFDIR}/dnscrypt_proxy.toml + +INSTALLATION_DIRS+= ${EGDIR} + do-install: ${RUN} cd ${WRKDIR}; [ ! -d bin ] || ${PAX} -rw bin ${DESTDIR}${PREFIX} + ${INSTALL_DATA} ${FILESDIR}/dnscrypt_proxy.toml ${DESTDIR}${EGDIR}/dnscrypt_proxy.toml .include "../../lang/go/go-package.mk" .include "../../mk/bsd.pkg.mk" diff --git a/net/dnscrypt-proxy2/PLIST b/net/dnscrypt-proxy2/PLIST index cb53aca8449..e43a9ee3fa8 100644 --- a/net/dnscrypt-proxy2/PLIST +++ b/net/dnscrypt-proxy2/PLIST @@ -1,2 +1,3 @@ -@comment $NetBSD: PLIST,v 1.1 2018/07/15 16:10:32 bsiegert Exp $ +@comment $NetBSD: PLIST,v 1.2 2018/10/01 15:05:48 nia Exp $ bin/dnscrypt-proxy +share/examples/dnscrypt-proxy/dnscrypt_proxy.toml diff --git a/net/dnscrypt-proxy2/files/dnscrypt_proxy.sh b/net/dnscrypt-proxy2/files/dnscrypt_proxy.sh new file mode 100644 index 00000000000..e257458c35f --- /dev/null +++ b/net/dnscrypt-proxy2/files/dnscrypt_proxy.sh @@ -0,0 +1,29 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dnscrypt_proxy.sh,v 1.1 2018/10/01 15:05:48 nia Exp $ +# +# PROVIDE: dnscrypt_proxy +# REQUIRE: DAEMON + +. /etc/rc.subr + +name="dnscrypt_proxy" +rcvar=${name} +command="@PREFIX@/bin/dnscrypt-proxy" +command_args="-syslog -config @PKG_SYSCONFDIR@/${name}.toml -pidfile @VARBASE@/run/${name}.pid &" +required_files="@PKG_SYSCONFDIR@/${name}.toml" +pidfile="@VARBASE@/run/${name}.pid" +extra_commands="configtest" +configtest_cmd="dnscrypt_proxy_configtest" + +dnscrypt_proxy_configtest() +{ + if [ ! -f ${required_files} ]; then + warn "${required_files} does not exist." + return 1; + fi + ${command} -check -config ${required_files} +} + +load_rc_config $name +run_rc_command "$1" diff --git a/net/dnscrypt-proxy2/files/dnscrypt_proxy.toml b/net/dnscrypt-proxy2/files/dnscrypt_proxy.toml new file mode 100644 index 00000000000..fb066271a04 --- /dev/null +++ b/net/dnscrypt-proxy2/files/dnscrypt_proxy.toml @@ -0,0 +1,23 @@ +listen_addresses = ['127.0.0.1:53', '[::1]:53'] + +ipv4_servers = true +ipv6_servers = true + +require_nolog = true +require_nofilter = true + +dnscrypt_servers = true +doh_servers = false + +fallback_resolver = '1.1.1.1:53' +ignore_system_dns = true + +use_syslog = true + +[sources] + [sources.'public-resolvers'] + url = 'https://download.dnscrypt.info/resolvers-list/v2/public-resolvers.md' + cache_file = 'public-resolvers.md' + minisign_key = 'RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3' + refresh_delay = 72 + prefix = '' |