From nobody Sun Oct 22 15:00:09 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD1hT623Nz4xQZB; Sun, 22 Oct 2023 15:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SD1hT5qj2z4KXW; Sun, 22 Oct 2023 15:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697986809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JfFDJ7yqCawUi6848cvrqmjYMAw1+SfOj8g3RiJSXhM=; b=rLBqrEqCzJO4wliogPFQg3EbzIn0T1Yswg2AoGc8+p+G50l0ABuK1Tnub96JN+6dtwSpMZ X0USlSogNW32l5kR4xwHPBqJnwdLFo9doadAEnuITU+DDI9fgUkCbtx2FxEU1MPge0D0hI uQe+omtAX/ugaZtppnFu0zPPD5uph17RxhWRgtozc0UgrOdOJFcAUyALRmiInGZ/5EhGwC 3++VrJJAFdKes8J1Uv0O6x/fxLm6k6Gav5tB7Jxk+c/dFpKTJMZx9nAWEae6Et/8I1uW3O /nEaBgolmm5M+427KjBcpzzInPIh6AMYFVnjvOH/ZeUl1UutCphTJP4NbdYT0A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697986809; a=rsa-sha256; cv=none; b=ZaccLPiFCc0cOl3fSJZVW/Fkyve+Am9qOn+3OISrUjz4x/37SKsQIetN/8Ty6wsK/azdzh jxTuJ3UyOzExFToJcWvNI/EzMYha2t2VUWfj0yQvMNWCIrq/yXM4kPOa/lx8UcjYyOfxR9 J15TLD8IXtPHWxwRrPSL0UfqyERdQzKXasVtBwiJqLPChdz9ms3AiBpw99l1idqPa1FyJ0 wioUVsJEz/MFaj7k5g4iOwnB6U1Q4ypu6kmNZbrcBnGTeYPHVxXd52IMQmLMoSc3uSjgW9 4Bw3C2G2CEwJfXZCq+tzw92K+tI6VXbYmbklrdkuIWriXbHefZ5nVddBNyLKzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697986809; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JfFDJ7yqCawUi6848cvrqmjYMAw1+SfOj8g3RiJSXhM=; b=DEMtH2+dOCf5JKB5EMNmmgM5KYHnLvCGTS8ZOV1H2QsDHetAMPBlKkpFDPKu9jf8+Zh8Lv vvQI6h2HoCqGcSJCyg9Rv3IC2zzOAzP1GdfWWkttL1DJQ2LLFumkUvKcQdlIbTFSKHD5vs EjuvsvfrFg8OIUPhJyLz/euczgks2ikckHnnKYNz/+4aGzoiHXknsdFSyex+KR3T/Wn08J u0qECo6EFZ8vAsH/RClfVenKRmFnYIiK+6pg40k3oMtVrdF5xc4U1urqlo97tBAUIksBJo c2PMASuYIa4srEGtKzBEGDew9CuQ+pfPGGn8I2aYhKt70sv5mDJPbw1Z5XoXfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD1hT4vjWz12N9; Sun, 22 Oct 2023 15:00:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MF09Nw021302; Sun, 22 Oct 2023 15:00:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MF09rO021293; Sun, 22 Oct 2023 15:00:09 GMT (envelope-from git) Date: Sun, 22 Oct 2023 15:00:09 GMT Message-Id: <202310221500.39MF09rO021293@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: 86b0e308eb20 - main - dns/godns: New port: Dynamic DNS (DDNS) client with notification support List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86b0e308eb20ed0c8692386b1f1ee7011d2686ed Auto-Submitted: auto-generated The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=86b0e308eb20ed0c8692386b1f1ee7011d2686ed commit 86b0e308eb20ed0c8692386b1f1ee7011d2686ed Author: Daniel Engberg AuthorDate: 2023-10-22 14:52:42 +0000 Commit: Daniel Engberg CommitDate: 2023-10-22 14:52:52 +0000 dns/godns: New port: Dynamic DNS (DDNS) client with notification support Yet another client but with support for sending notifications over multiple services such as Email, Telegram, Slack, Discord, Pushover and additional ways such as webhooks. Website: https://github.com/TimothyYe/godns --- dns/Makefile | 1 + dns/godns/Makefile | 67 +++++++++++++++++++++++++++++++ dns/godns/distinfo | 69 ++++++++++++++++++++++++++++++++ dns/godns/files/godns-config.json.sample | 16 ++++++++ dns/godns/files/godns.in | 55 +++++++++++++++++++++++++ dns/godns/files/patch-cmd_godns_godns.go | 16 ++++++++ dns/godns/files/pkg-message.in | 19 +++++++++ dns/godns/pkg-descr | 3 ++ dns/godns/pkg-plist | 2 + 9 files changed, 248 insertions(+) diff --git a/dns/Makefile b/dns/Makefile index 7234dbb3bc58..f66925dd5353 100644 --- a/dns/Makefile +++ b/dns/Makefile @@ -76,6 +76,7 @@ SUBDIR += gdnsd3 SUBDIR += gen6dns SUBDIR += getdns + SUBDIR += godns SUBDIR += hesiod SUBDIR += hetzner_ddns SUBDIR += hostdb diff --git a/dns/godns/Makefile b/dns/godns/Makefile new file mode 100644 index 000000000000..897a496c7579 --- /dev/null +++ b/dns/godns/Makefile @@ -0,0 +1,67 @@ +PORTNAME= godns +DISTVERSIONPREFIX= v +DISTVERSION= 3.0.4 +CATEGORIES= dns + +MAINTAINER= diizzy@FreeBSD.org +COMMENT= Dynamic DNS client (DDNS) with optional external reporting features +WWW= https://github.com/TimothyYe/godns + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= go:modules +USE_RC_SUBR= ${PORTNAME} + +USE_GITHUB= yes +GH_ACCOUNT= TimothyYe + +GH_TUPLE= \ + alexcesaro:quotedprintable:2caba252f4dc:alexcesaro_quotedprintable/vendor/gopkg.in/alexcesaro/quotedprintable.v3 \ + bitly:go-simplejson:v0.5.0:bitly_go_simplejson/vendor/github.com/bitly/go-simplejson \ + bmizerany:assert:b7ed37b82869:bmizerany_assert/vendor/github.com/bmizerany/assert \ + bwmarrin:discordgo:v0.27.1:bwmarrin_discordgo/vendor/github.com/bwmarrin/discordgo \ + fatih:color:v1.15.0:fatih_color/vendor/github.com/fatih/color \ + go-check:check:10cb98267c6c:go_check_check/vendor/gopkg.in/check.v1 \ + go-gomail:gomail:81ebce5c23df:go_gomail_gomail/vendor/gopkg.in/gomail.v2 \ + go-ini:ini:v1.67.0:go_ini_ini/vendor/gopkg.in/ini.v1 \ + go-resty:resty:v2.7.0:go_resty_resty_v2/vendor/github.com/go-resty/resty/v2 \ + go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \ + golang:appengine:v1.6.7:golang_appengine/vendor/google.golang.org/appengine \ + golang:crypto:v0.8.0:golang_crypto/vendor/golang.org/x/crypto \ + golang:mod:v0.10.0:golang_mod/vendor/golang.org/x/mod \ + golang:net:v0.9.0:golang_net/vendor/golang.org/x/net \ + golang:oauth2:v0.7.0:golang_oauth2/vendor/golang.org/x/oauth2 \ + golang:protobuf:v1.5.3:golang_protobuf/vendor/github.com/golang/protobuf \ + golang:sys:v0.7.0:golang_sys/vendor/golang.org/x/sys \ + golang:text:v0.9.0:golang_text/vendor/golang.org/x/text \ + golang:tools:v0.8.0:golang_tools/vendor/golang.org/x/tools \ + google:uuid:v1.3.0:google_uuid/vendor/github.com/google/uuid \ + gorilla:websocket:v1.5.0:gorilla_websocket/vendor/github.com/gorilla/websocket \ + json-iterator:go:v1.1.12:json_iterator_go/vendor/github.com/json-iterator/go \ + kr:pretty:v0.3.1:kr_pretty/vendor/github.com/kr/pretty \ + linode:linodego:v1.16.1:linode_linodego/vendor/github.com/linode/linodego \ + mattn:go-colorable:v0.1.13:mattn_go_colorable/vendor/github.com/mattn/go-colorable \ + mattn:go-isatty:v0.0.18:mattn_go_isatty/vendor/github.com/mattn/go-isatty \ + miekg:dns:v1.1.53:miekg_dns/vendor/github.com/miekg/dns \ + modern-go:concurrent:bacd9c7ef1dd:modern_go_concurrent/vendor/github.com/modern-go/concurrent \ + modern-go:reflect2:v1.0.2:modern_go_reflect2/vendor/github.com/modern-go/reflect2 \ + ovh:go-ovh:v1.4.1:ovh_go_ovh/vendor/github.com/ovh/go-ovh \ + protocolbuffers:protobuf-go:v1.30.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \ + sirupsen:logrus:v1.9.0:sirupsen_logrus/vendor/github.com/sirupsen/logrus \ + stretchr:testify:v1.8.2:stretchr_testify/vendor/github.com/stretchr/testify + +GO_TARGET= ./cmd/${PORTNAME} + +SUB_FILES= pkg-message + +post-patch: + @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ + ${PATCH_WRKSRC}/cmd/godns/godns.go + @${REINPLACE_CMD} -e 's|%%DISTVERSION%%|${DISTVERSION}|g' \ + ${PATCH_WRKSRC}/cmd/godns/godns.go + +post-install: + ${INSTALL_DATA} ${FILESDIR}/godns-config.json.sample ${STAGEDIR}${PREFIX}/etc + +.include diff --git a/dns/godns/distinfo b/dns/godns/distinfo new file mode 100644 index 000000000000..53c73f8f704a --- /dev/null +++ b/dns/godns/distinfo @@ -0,0 +1,69 @@ +TIMESTAMP = 1697979253 +SHA256 (TimothyYe-godns-v3.0.4_GH0.tar.gz) = 1874ac383aaa5d218158ae8862a228307773432479dfd2e22c62d941f372a1ff +SIZE (TimothyYe-godns-v3.0.4_GH0.tar.gz) = 326763 +SHA256 (alexcesaro-quotedprintable-2caba252f4dc_GH0.tar.gz) = 1a314d172f499342a97996e30ae1731b2e923e17031734d7350927458f544efb +SIZE (alexcesaro-quotedprintable-2caba252f4dc_GH0.tar.gz) = 10425 +SHA256 (bitly-go-simplejson-v0.5.0_GH0.tar.gz) = 44196c95263e74277372319e5a6cb7f53b29ef7ddab8c7fed6ce6fc80144d465 +SIZE (bitly-go-simplejson-v0.5.0_GH0.tar.gz) = 5994 +SHA256 (bmizerany-assert-b7ed37b82869_GH0.tar.gz) = f7dc11f10c5e52a94c836e15e7aff05ad4afba7436f66e5f4506806627c4635e +SIZE (bmizerany-assert-b7ed37b82869_GH0.tar.gz) = 1469 +SHA256 (bwmarrin-discordgo-v0.27.1_GH0.tar.gz) = b2d58bfee839f9d34a1379d66e11213e50a0eccc00fdabd78b823c3559e58ff4 +SIZE (bwmarrin-discordgo-v0.27.1_GH0.tar.gz) = 154721 +SHA256 (fatih-color-v1.15.0_GH0.tar.gz) = e7a92edb32453c11aec9fac4d9f2b8fc42fac72249a7ca567c926a112534030e +SIZE (fatih-color-v1.15.0_GH0.tar.gz) = 11273 +SHA256 (go-check-check-10cb98267c6c_GH0.tar.gz) = 0a42d9d5a49ebc30174e5840238e446f5fb16899bfaa6a6f63d12ab9953df293 +SIZE (go-check-check-10cb98267c6c_GH0.tar.gz) = 32375 +SHA256 (go-gomail-gomail-81ebce5c23df_GH0.tar.gz) = 13ee4111b51dd292a87f6216131eb614603dc54a5a34d6fb44deb0c352a217ba +SIZE (go-gomail-gomail-81ebce5c23df_GH0.tar.gz) = 16568 +SHA256 (go-ini-ini-v1.67.0_GH0.tar.gz) = 06ba51234140118d1b6064f1817aa89cc971c6e7ce04cb9d286e6660d89296c8 +SIZE (go-ini-ini-v1.67.0_GH0.tar.gz) = 53531 +SHA256 (go-resty-resty-v2.7.0_GH0.tar.gz) = 9afa2ab22afb81b4ff7275f5a2cb055b1bf3b19ff9506036f35c85ec0465beee +SIZE (go-resty-resty-v2.7.0_GH0.tar.gz) = 2644943 +SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5 +SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173 +SHA256 (golang-appengine-v1.6.7_GH0.tar.gz) = c623d81235f7c9699e299b328191d813337dd57dcc800d7afdb5130e8c321a8f +SIZE (golang-appengine-v1.6.7_GH0.tar.gz) = 333007 +SHA256 (golang-crypto-v0.8.0_GH0.tar.gz) = b8fb5d22ed977e7912d8a2c80ff40a4632fba492d43cc638c8b8bb7e961bea33 +SIZE (golang-crypto-v0.8.0_GH0.tar.gz) = 1634889 +SHA256 (golang-mod-v0.10.0_GH0.tar.gz) = 3d944a6ee2d258713636400930d0d5913a71a861d8efd00b51b97e8d19b487ba +SIZE (golang-mod-v0.10.0_GH0.tar.gz) = 120380 +SHA256 (golang-net-v0.9.0_GH0.tar.gz) = f7f85ae52cf7dae86a30c71db6601f84bb1dd25e68e81b04deaeeb0dc3bbad1f +SIZE (golang-net-v0.9.0_GH0.tar.gz) = 1244440 +SHA256 (golang-oauth2-v0.7.0_GH0.tar.gz) = 18407271b525c12d53d1264f13e04ed83b250b0fe78da96b4eabd687a79de260 +SIZE (golang-oauth2-v0.7.0_GH0.tar.gz) = 87761 +SHA256 (golang-protobuf-v1.5.3_GH0.tar.gz) = 48457a6a9e8c78a7556ff5ff4a4c77d7df9bf70e882491ee0f3f1ff06db2bfaa +SIZE (golang-protobuf-v1.5.3_GH0.tar.gz) = 171822 +SHA256 (golang-sys-v0.7.0_GH0.tar.gz) = be9b6e1cb2fdb5822ea7fde4c3b226cfe47927c4305db9fa9fc1fae4fdf213b0 +SIZE (golang-sys-v0.7.0_GH0.tar.gz) = 1434670 +SHA256 (golang-text-v0.9.0_GH0.tar.gz) = 410b532978a3dcd01caa39baa39e0c6044e066545ab231b523cafbccf4425791 +SIZE (golang-text-v0.9.0_GH0.tar.gz) = 8361612 +SHA256 (golang-tools-v0.8.0_GH0.tar.gz) = 83277ab2b9590c472d5127d49757fbb44d45e1518c1f59eac7d0d8898b1970e6 +SIZE (golang-tools-v0.8.0_GH0.tar.gz) = 3399590 +SHA256 (google-uuid-v1.3.0_GH0.tar.gz) = 7f7f37c47980e0afcc178a9ffc390bec29ed2371919b4c07658eb01791a7f921 +SIZE (google-uuid-v1.3.0_GH0.tar.gz) = 16210 +SHA256 (gorilla-websocket-v1.5.0_GH0.tar.gz) = 5d86f9e1c76ff7ceca0747f78b79864fbaec9d440f4fdb03197466e5102a86b0 +SIZE (gorilla-websocket-v1.5.0_GH0.tar.gz) = 54155 +SHA256 (json-iterator-go-v1.1.12_GH0.tar.gz) = ff70e539fd919da757a2f3a530a053e7577cb4d7e2824fc1058d3abbefbb523e +SIZE (json-iterator-go-v1.1.12_GH0.tar.gz) = 84307 +SHA256 (kr-pretty-v0.3.1_GH0.tar.gz) = e6fa7db2708320e66a1645bf6b234e524e73f4163ca0519b8608616e48f5d206 +SIZE (kr-pretty-v0.3.1_GH0.tar.gz) = 10227 +SHA256 (linode-linodego-v1.16.1_GH0.tar.gz) = 505244a8c76c2ba806bb5843ef97eaee1a0215769e4beed8d92649ae88a7b902 +SIZE (linode-linodego-v1.16.1_GH0.tar.gz) = 428705 +SHA256 (mattn-go-colorable-v0.1.13_GH0.tar.gz) = c3b62c76d365906bba9aa9d9ec048fd33a2a5742299d6482a08e7466d4c52d77 +SIZE (mattn-go-colorable-v0.1.13_GH0.tar.gz) = 9762 +SHA256 (mattn-go-isatty-v0.0.18_GH0.tar.gz) = 5b59235986f7a917559181ff814f83f610928b444f290bed733c3f2f900b803d +SIZE (mattn-go-isatty-v0.0.18_GH0.tar.gz) = 4675 +SHA256 (miekg-dns-v1.1.53_GH0.tar.gz) = 4f75b864cdbfed2c86aa6ba69a5064b84ac1317aaacd5a43c144104dff830f0a +SIZE (miekg-dns-v1.1.53_GH0.tar.gz) = 209036 +SHA256 (modern-go-concurrent-bacd9c7ef1dd_GH0.tar.gz) = d673e902118a6ece63198dc7e0961e904d0410f142726df0936ec1a52035a60f +SIZE (modern-go-concurrent-bacd9c7ef1dd_GH0.tar.gz) = 7526 +SHA256 (modern-go-reflect2-v1.0.2_GH0.tar.gz) = eab313f24c09d512f004d489aeed0d0a485f789abd07e7df411375035174341b +SIZE (modern-go-reflect2-v1.0.2_GH0.tar.gz) = 14030 +SHA256 (ovh-go-ovh-v1.4.1_GH0.tar.gz) = 6a8beedbd7486572a268974a3a95a9d8f28df1673af6a7fae814de4319acd786 +SIZE (ovh-go-ovh-v1.4.1_GH0.tar.gz) = 20810 +SHA256 (protocolbuffers-protobuf-go-v1.30.0_GH0.tar.gz) = 3279a16ec3bdd7c53fe1599134de298ed90d9f3b6ec1c1eb5f3b76ba5aaa9f0c +SIZE (protocolbuffers-protobuf-go-v1.30.0_GH0.tar.gz) = 1298988 +SHA256 (sirupsen-logrus-v1.9.0_GH0.tar.gz) = 12446ed9eb96573c2aae4df2db81900a65bfd21d2ce92efde7201614e42134f7 +SIZE (sirupsen-logrus-v1.9.0_GH0.tar.gz) = 49098 +SHA256 (stretchr-testify-v1.8.2_GH0.tar.gz) = b1f8aab2022b39d9263dc38ce4a974f64c0219f580a6fe9c56693beaf2702516 +SIZE (stretchr-testify-v1.8.2_GH0.tar.gz) = 98353 diff --git a/dns/godns/files/godns-config.json.sample b/dns/godns/files/godns-config.json.sample new file mode 100644 index 000000000000..2547a5456998 --- /dev/null +++ b/dns/godns/files/godns-config.json.sample @@ -0,0 +1,16 @@ +{ + "provider": "MyDDNSProvider", + "email": "MyUserName", + "password": "MyPassWord", + "domains": [{ + "domain_name": "foobar.domain", + "sub_domains": ["subdomain"] + } + ], + "ip_type": "IPv4", + "ip_urls": [""], + "ip_interface": "igb0", + "interval": 300, + "debug_info": false, + "run_once": false +} diff --git a/dns/godns/files/godns.in b/dns/godns/files/godns.in new file mode 100644 index 000000000000..1785c653ce5a --- /dev/null +++ b/dns/godns/files/godns.in @@ -0,0 +1,55 @@ +#!/bin/sh + +# PROVIDE: godns +# REQUIRE: DAEMON LOGIN +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable godns: +# godns_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable godns. +# godns_flags (str): Custom additional arguments to be passed +# to godns (default empty). +# godns_conf_dir (str): Directory where ${name} configuration +# data is stored. + +. /etc/rc.subr + +name="godns" +rcvar=godns_enable + +load_rc_config ${name} + +: ${godns_enable:="NO"} +: ${godns_user:="nobody"} +: ${godns_group:="nogroup"} +: ${godns_conf_dir="%%PREFIX%%/etc"} + +start_precmd=godns_precmd +stop_postcmd=godns_stop_postcmd + +procname="%%PREFIX%%/bin/${name}" +pidfile="/var/run/${name}/${name}.pid" +logfile="/var/log/${name}/${name}.log" + +required_files="${godns_conf_dir}/${name}-config.json" + +command="/usr/sbin/daemon" +command_args="-f -t ${name} -o ${logfile} -p ${pidfile} ${procname} -c ${required_files} ${godns_args}" + +godns_precmd() +{ + local rundir=${pidfile%/*} + if [ ! -d $rundir ] ; then + install -d -m 0755 -o ${godns_user} -g ${godns_group} $rundir + fi + local logdir=${logfile%/*} + install -d -m 0750 -o ${godns_user} -g ${godns_group} $logdir +} + +godns_stop_postcmd() +{ + rm -f "$rundir" +} + +run_rc_command "$1" diff --git a/dns/godns/files/patch-cmd_godns_godns.go b/dns/godns/files/patch-cmd_godns_godns.go new file mode 100644 index 000000000000..fe61039e125b --- /dev/null +++ b/dns/godns/files/patch-cmd_godns_godns.go @@ -0,0 +1,16 @@ +--- cmd/godns/godns.go.orig 2023-01-19 15:20:32 UTC ++++ cmd/godns/godns.go +@@ -16,11 +16,11 @@ import ( + + var ( + configuration settings.Settings +- optConf = flag.String("c", "./config.json", "Specify a config file") ++ optConf = flag.String("c", "%%PREFIX%%/etc/godns-config.json", "Specify a config file") + optHelp = flag.Bool("h", false, "Show help") + + // Version is current version of GoDNS. +- Version = "0.1" ++ Version = "%%DISTVERSION%%" + ) + + func init() { diff --git a/dns/godns/files/pkg-message.in b/dns/godns/files/pkg-message.in new file mode 100644 index 000000000000..af66ace952b9 --- /dev/null +++ b/dns/godns/files/pkg-message.in @@ -0,0 +1,19 @@ +[ +{ type: install + message: <