Skip to content

Commit 47644ba

Browse files
GeorgeSapkin1715173329
authored andcommitted
syncthing: fix discovery and relay extra args
Update configuration option examples. Fixes: openwrt#26952 Signed-off-by: George Sapkin <[email protected]>
1 parent 654fa2f commit 47644ba

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

utils/syncthing/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
22

33
PKG_NAME:=syncthing
44
PKG_VERSION:=1.30.0
5-
PKG_RELEASE:=1
5+
PKG_RELEASE:=2
66

77
PKG_SOURCE:=syncthing-source-v$(PKG_VERSION).tar.gz
88
PKG_SOURCE_URL:=https://github.com/syncthing/syncthing/releases/download/v$(PKG_VERSION)

utils/syncthing/files/stdiscosrv.conf

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@ config stdiscosrv 'stdiscosrv'
44
option listen ':8443'
55
option db_dir '/etc/stdiscosrv/discovery.db'
66

7-
# # Find the documents from: https://docs.syncthing.net/users/stdiscosrv.html
7+
# Find the documents from: https://docs.syncthing.net/users/stdiscosrv.html
88
# option cert '/etc/stdiscosrv/cert.pem'
99
# option key '/etc/stdiscosrv/key.pem'
10+
# option db_flush_interval '5m'
1011
# option metrics_listen ''
11-
# option replicate ''
12-
# option replication_listen ':19200'
1312

14-
# # CLI options with no value should be defined as booleans and theirs
15-
# # names should be prefixed with '_'.
13+
# CLI options with no value should be defined as booleans and theirs names
14+
# should be prefixed with '_'.
15+
# option _compression '0'
1616
# option _debug '0'
1717
# option _http '1'
18-

utils/syncthing/files/stdiscosrv.init

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ config_cb() {
2121
[ "$value" = "0" ] || extra_args="$extra_args -${option//_/-}"
2222
;;
2323
*)
24-
extra_args="$extra_args -${option//_/-}=$value"
24+
extra_args="$extra_args --${option//_/-}='$value'"
2525
;;
2626
esac
2727
}
@@ -33,8 +33,7 @@ config_cb() {
3333
}
3434
}
3535

36-
service_triggers()
37-
{
36+
service_triggers() {
3837
procd_add_reload_trigger "stdiscosrv"
3938
}
4039

utils/syncthing/files/strelaysrv.conf

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,24 @@ config strelaysrv 'strelaysrv'
44
option keys '/etc/strelaysrv'
55
option listen ':22067'
66

7-
# # Find the documents from: https://docs.syncthing.net/users/strelaysrv.html
7+
# Find the documents from: https://docs.syncthing.net/users/strelaysrv.html
88
# option ext_address ''
99
# option global_rate ''
1010
# option message_timeout '1m0s'
11-
# option nat_lease 60
12-
# option nat_renewal 30
13-
# option nat_timeout 10
11+
# option nat_lease '60'
12+
# option nat_renewal '30'
13+
# option nat_timeout '10'
1414
# option network_timeout '2m0s'
1515
# option per_session_rate ''
1616
# option ping_interval '1m0s'
1717
# option pools ''
1818
# option protocol 'tcp'
1919
# option provided_by ''
2020
# option status_srv ':22070'
21+
# option token ''
2122

22-
# # CLI options with no value should be defined as booleans and theirs
23-
# # names should be prefixed with '_'.
23+
# CLI options with no value should be defined as booleans and theirs names
24+
# should be prefixed with '_'.
2425
# option _debug '0'
2526
# option _nat '0'
26-
27+
# option _pprof '0'

utils/syncthing/files/strelaysrv.init

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,22 @@ config_cb() {
1818
eval $option=$value
1919
;;
2020
_*)
21-
[ "$value" = "0" ] || extra_args="$extra_args -${option//_/-}"
21+
[ "$value" = "0" ] || extra_args="$extra_args ${option//_/-}"
2222
;;
2323
*)
24-
extra_args="$extra_args -${option//_/-}=$value"
24+
extra_args="$extra_args -${option//_/-}='$value'"
2525
;;
2626
esac
2727
}
2828

2929
list_cb() {
3030
local name="$1"
3131
local value="$2"
32-
[ "$name" = "_" ] && extra_args="$extra_args --${value//_/-}" || return 0
32+
[ "$name" = "_" ] && extra_args="$extra_args -${value//_/-}" || return 0
3333
}
3434
}
3535

36-
service_triggers()
37-
{
36+
service_triggers() {
3837
procd_add_reload_trigger "strelaysrv"
3938
}
4039

0 commit comments

Comments
 (0)