aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/cloudflared/Makefile5
-rw-r--r--net/cloudflared/distinfo6
-rw-r--r--net/cloudflared/files/cloudflared.in36
3 files changed, 41 insertions, 6 deletions
diff --git a/net/cloudflared/Makefile b/net/cloudflared/Makefile
index 7fdf0a6d6657..ea96b2c197b4 100644
--- a/net/cloudflared/Makefile
+++ b/net/cloudflared/Makefile
@@ -1,7 +1,7 @@
# $FreeBSD$
PORTNAME= cloudflared
-DISTVERSION= 2021.3.2
+DISTVERSION= 2021.3.5
CATEGORIES= net www
MAINTAINER= egypcio@FreeBSD.org
@@ -15,10 +15,9 @@ LICENSE_PERMS= no-dist-sell no-pkg-sell
RUN_DEPENDS= ca_root_nss>=0:security/ca_root_nss
USES= cpe go:modules
-
+USE_RC_SUBR= ${PORTNAME}
USE_GITHUB= yes
GH_ACCOUNT= cloudflare
-
CPE_VENDOR= cloudflare
GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}
diff --git a/net/cloudflared/distinfo b/net/cloudflared/distinfo
index 4097995a196e..91794f38bddd 100644
--- a/net/cloudflared/distinfo
+++ b/net/cloudflared/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1616788765
-SHA256 (cloudflare-cloudflared-2021.3.2_GH0.tar.gz) = b16db783ae4d25d85c16f00a4df3f4138f3c3f487d8788c50b83cbb620a3ce16
-SIZE (cloudflare-cloudflared-2021.3.2_GH0.tar.gz) = 7455628
+TIMESTAMP = 1616836174
+SHA256 (cloudflare-cloudflared-2021.3.5_GH0.tar.gz) = 1521846ee97e066ca18ec4cefed1a84b634b57d989c76d186086fff19b4746d4
+SIZE (cloudflare-cloudflared-2021.3.5_GH0.tar.gz) = 7471623
diff --git a/net/cloudflared/files/cloudflared.in b/net/cloudflared/files/cloudflared.in
new file mode 100644
index 000000000000..ecad45582a12
--- /dev/null
+++ b/net/cloudflared/files/cloudflared.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: cloudflared
+# REQUIRE: cleanvar SERVERS
+#
+# Options to configure cloudflared via /etc/rc.conf:
+#
+# cloudflared_enable (bool) Enable service on boot
+# Default: NO
+#
+# cloudflared_conf (str) Config file to use
+# Default: %%ETCDIR%%/config.yml
+#
+# cloudflared_mode (str) Mode to run cloudflared as (tunnel, or proxy-dns)
+# Default: tunnel
+
+. /etc/rc.subr
+
+name="cloudflared"
+rcvar="cloudflared_enable"
+logfile="/var/log/cloudflared/cloudflared.log"
+pidfile="/var/run/cloudflared.pid"
+procname="%%PREFIX%%/bin/cloudflared"
+
+load_rc_config $name
+
+: ${cloudflared_enable:="NO"}
+: ${cloudflared_conf:="%%ETCDIR%%/config.yml"}
+: ${cloudflared_mode:="tunnel"}
+
+command="/usr/sbin/daemon"
+command_args="-o ${logfile} -p ${pidfile} -f ${procname} --cred-file ${cloudflared_conf} ${cloudflared_mode}"
+
+run_rc_command "$1"