aboutsummaryrefslogtreecommitdiff
path: root/net/cloudflared/files
diff options
context:
space:
mode:
authorVinícius Zavam <egypcio@FreeBSD.org>2021-03-27 11:10:53 +0000
committerVinícius Zavam <egypcio@FreeBSD.org>2021-03-27 11:10:53 +0000
commita3720693c07978a14f5759e5d3588c8c6c5ea33e (patch)
tree7efaa53b21d000572c5749daf2919f9b08abf616 /net/cloudflared/files
parent51f720e5167fe82f9e43190f40f36116966d11ec (diff)
downloadports-a3720693c07978a14f5759e5d3588c8c6c5ea33e.tar.gz
ports-a3720693c07978a14f5759e5d3588c8c6c5ea33e.zip
net/cloudflared: update 2021.3.2 to 2021.3.5
while here, add rc file for this ports' service * github.com/cloudflare/cloudflared/compare/2021.3.2...2021.3.5
Notes
Notes: svn path=/head/; revision=569320
Diffstat (limited to 'net/cloudflared/files')
-rw-r--r--net/cloudflared/files/cloudflared.in36
1 files changed, 36 insertions, 0 deletions
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"