syncthing: fix discovery and relay extra args

Update configuration option examples.

Fixes: #26952
Signed-off-by: George Sapkin <george@sapk.in>
This commit is contained in:
George Sapkin
2025-07-30 16:54:03 +03:00
committed by Tianling Shen
parent 654fa2f5f3
commit 47644ba468
5 changed files with 20 additions and 22 deletions

View File

@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=syncthing
PKG_VERSION:=1.30.0
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)

View File

@@ -4,15 +4,14 @@ config stdiscosrv 'stdiscosrv'
option listen ':8443'
option db_dir '/etc/stdiscosrv/discovery.db'
# # Find the documents from: https://docs.syncthing.net/users/stdiscosrv.html
# Find the documents from: https://docs.syncthing.net/users/stdiscosrv.html
# option cert '/etc/stdiscosrv/cert.pem'
# option key '/etc/stdiscosrv/key.pem'
# option db_flush_interval '5m'
# option metrics_listen ''
# option replicate ''
# option replication_listen ':19200'
# # CLI options with no value should be defined as booleans and theirs
# # names should be prefixed with '_'.
# CLI options with no value should be defined as booleans and theirs names
# should be prefixed with '_'.
# option _compression '0'
# option _debug '0'
# option _http '1'

View File

@@ -21,7 +21,7 @@ config_cb() {
[ "$value" = "0" ] || extra_args="$extra_args -${option//_/-}"
;;
*)
extra_args="$extra_args -${option//_/-}=$value"
extra_args="$extra_args --${option//_/-}='$value'"
;;
esac
}
@@ -33,8 +33,7 @@ config_cb() {
}
}
service_triggers()
{
service_triggers() {
procd_add_reload_trigger "stdiscosrv"
}

View File

@@ -4,13 +4,13 @@ config strelaysrv 'strelaysrv'
option keys '/etc/strelaysrv'
option listen ':22067'
# # Find the documents from: https://docs.syncthing.net/users/strelaysrv.html
# Find the documents from: https://docs.syncthing.net/users/strelaysrv.html
# option ext_address ''
# option global_rate ''
# option message_timeout '1m0s'
# option nat_lease 60
# option nat_renewal 30
# option nat_timeout 10
# option nat_lease '60'
# option nat_renewal '30'
# option nat_timeout '10'
# option network_timeout '2m0s'
# option per_session_rate ''
# option ping_interval '1m0s'
@@ -18,9 +18,10 @@ config strelaysrv 'strelaysrv'
# option protocol 'tcp'
# option provided_by ''
# option status_srv ':22070'
# option token ''
# # CLI options with no value should be defined as booleans and theirs
# # names should be prefixed with '_'.
# CLI options with no value should be defined as booleans and theirs names
# should be prefixed with '_'.
# option _debug '0'
# option _nat '0'
# option _pprof '0'

View File

@@ -18,10 +18,10 @@ config_cb() {
eval $option=$value
;;
_*)
[ "$value" = "0" ] || extra_args="$extra_args -${option//_/-}"
[ "$value" = "0" ] || extra_args="$extra_args ${option//_/-}"
;;
*)
extra_args="$extra_args -${option//_/-}=$value"
extra_args="$extra_args -${option//_/-}='$value'"
;;
esac
}
@@ -29,12 +29,11 @@ config_cb() {
list_cb() {
local name="$1"
local value="$2"
[ "$name" = "_" ] && extra_args="$extra_args --${value//_/-}" || return 0
[ "$name" = "_" ] && extra_args="$extra_args -${value//_/-}" || return 0
}
}
service_triggers()
{
service_triggers() {
procd_add_reload_trigger "strelaysrv"
}