From: Ryan Keane Date: Thu, 20 Jun 2024 21:16:27 +0000 (-0400) Subject: cloudflared: Fix incorrect uci config syntax X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2d711c8fbda489ab5f89b162c040b6502986e970;p=feed%2Fpackages.git cloudflared: Fix incorrect uci config syntax Fix incorrect uci config syntax, caused by a careless newbie contributer. Modify function append_param_arg() in init script, to support hyphenated arguments. Add more command parameters as uci options, no value is set to keep it default. Signed-off-by: Ryan Keane --- diff --git a/net/cloudflared/Makefile b/net/cloudflared/Makefile index 3eb55ae89a..c58d99f9fa 100644 --- a/net/cloudflared/Makefile +++ b/net/cloudflared/Makefile @@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cloudflared PKG_VERSION:=2024.6.1 -PKG_RELEASE:=2 +PKG_RELEASE:=3 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=https://codeload.github.com/cloudflare/cloudflared/tar.gz/$(PKG_VERSION)? diff --git a/net/cloudflared/files/cloudflared.config b/net/cloudflared/files/cloudflared.config index 324d3ecf32..e522cd5be5 100644 --- a/net/cloudflared/files/cloudflared.config +++ b/net/cloudflared/files/cloudflared.config @@ -4,10 +4,14 @@ config cloudflared 'config' option token '' option config '/etc/cloudflared/config.yml' option origincert '/etc/cloudflared/cert.pem' - option edge-bind-address 'auto' - option protocol 'auto' + option edge_bind_address '' + option edge_ip_version '' + option grace_period '' + option protocol 'http2' option region '' - option retries '5' + option retries '' + option tag '' + option metrics '' option loglevel 'info' option logfile '/var/log/cloudflared.log' diff --git a/net/cloudflared/files/cloudflared.init b/net/cloudflared/files/cloudflared.init index 2e511d8f56..ffef8d0931 100755 --- a/net/cloudflared/files/cloudflared.init +++ b/net/cloudflared/files/cloudflared.init @@ -10,7 +10,7 @@ PROG="/usr/bin/cloudflared" append_param_arg() { local value config_get value "config" "$1" $2 - [ -n "$value" ] && procd_append_param command "--$1" "$value" + [ -n "$value" ] && procd_append_param command "--${1//_/-}" "$value" } start_service() { @@ -26,10 +26,14 @@ start_service() { append_param_arg "config" "/etc/cloudflared/config.yml" append_param_arg "origincert" "/etc/cloudflared/cert.pem" - append_param_arg "edge-bind-address" + append_param_arg "edge_bind_address" + append_param_arg "edge_ip_version" + append_param_arg "grace_period" append_param_arg "protocol" append_param_arg "region" append_param_arg "retries" + append_param_arg "tag" + append_param_arg "metrics" append_param_arg "loglevel" append_param_arg "logfile"