mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 11:16:31 +04:00
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 <the.ra2.ifv@gmail.com>
(cherry picked from commit 2d711c8fbd)
[rebased upon 23.05 branch]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
committed by
Tianling Shen
parent
f01fbf8919
commit
341665c750
@@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cloudflared
|
||||
PKG_VERSION:=2024.4.0
|
||||
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)?
|
||||
|
||||
@@ -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'
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user