syncthing: fix discovery and relay extra args
authorGeorge Sapkin <[email protected]>
Wed, 30 Jul 2025 13:54:03 +0000 (16:54 +0300)
committerTianling Shen <[email protected]>
Wed, 6 Aug 2025 13:54:28 +0000 (21:54 +0800)
Update configuration option examples.

Fixes: #26952
Signed-off-by: George Sapkin <[email protected]>
utils/syncthing/Makefile
utils/syncthing/files/stdiscosrv.conf
utils/syncthing/files/stdiscosrv.init
utils/syncthing/files/strelaysrv.conf
utils/syncthing/files/strelaysrv.init

index 6188efe75339aca1e95242d474f3c7d60acfcf7f..a71704cb939e46a84009bba1f9d1b86ad951272d 100644 (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)
index e51ddef6629ec666dac027f13daad4110842dc11..3e0401451388b3dc380c4dee7f704d864d1c3298 100644 (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'
-
index 566fb12eb5799645aac01c33a8e576287e8b8f70..7ad243a202f39511520eaf4e5d9a647d86ffa8e6 100644 (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"
 }
 
index 56ac299ff58bc14be4b2a14330c4f5da08060d3f..b69fb824ff638e9a1d159af458661063499124c2 100644 (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'
index ced126b10ab7ce8405017a31e39a807840e42df9..f7fe4b95308652e3dbf6b7625a3e9a73019ea2ae 100644 (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"
 }