Friday, November 03, 2023

net/syncthing : add rc scripts for discovery and relay

this adds rc files to quickly enable/start discovery and relay servers

I configured the default option for the relay to not contribute to
the community pool of syncthing relays

Index: Makefile
===================================================================
RCS file: /cvs/ports/net/syncthing/Makefile,v
diff -u -p -r1.54 Makefile
--- Makefile 27 Sep 2023 14:18:34 -0000 1.54
+++ Makefile 3 Nov 2023 15:54:45 -0000
@@ -1,6 +1,7 @@
COMMENT = open decentralized synchronization utility

V = 1.24.0
+REVISION = 0
DISTNAME = syncthing-${V}
DISTFILES = syncthing-source-v${V}${EXTRACT_SUFX}

cvs server: Diffing patches
cvs server: Diffing pkg
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/syncthing/pkg/PLIST,v
diff -u -p -r1.10 PLIST
--- pkg/PLIST 8 Nov 2022 11:17:01 -0000 1.10
+++ pkg/PLIST 3 Nov 2023 15:54:45 -0000
@@ -1,6 +1,8 @@
@newgroup _syncthing:768
@newuser _syncthing:768:_syncthing::Syncthing user:${VARBASE}/syncthing:/sbin/nologin
@rcscript ${RCDIR}/syncthing
+@rcscript ${RCDIR}/syncthing_discovery
+@rcscript ${RCDIR}/syncthing_relay
@owner _syncthing
@group _syncthing
@sample ${VARBASE}/syncthing/
Index: pkg/syncthing_discovery.rc
===================================================================
RCS file: pkg/syncthing_discovery.rc
diff -N pkg/syncthing_discovery.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/syncthing_discovery.rc 3 Nov 2023 15:54:45 -0000
@@ -0,0 +1,12 @@
+#!/bin/ksh
+
+daemon="/usr/local/bin/stdiscosrv"
+daemon_flags=""
+daemon_user="_syncthing"
+
+. /etc/rc.d/rc.subr
+
+rc_bg=YES
+rc_reload=NO
+
+rc_cmd $1
Index: pkg/syncthing_relay.rc
===================================================================
RCS file: pkg/syncthing_relay.rc
diff -N pkg/syncthing_relay.rc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/syncthing_relay.rc 3 Nov 2023 15:54:45 -0000
@@ -0,0 +1,12 @@
+#!/bin/ksh
+
+daemon="/usr/local/bin/strelaysrv"
+daemon_flags="-pools=''"
+daemon_user="_syncthing"
+
+. /etc/rc.d/rc.subr
+
+rc_bg=YES
+rc_reload=NO
+
+rc_cmd $1

No comments:

Post a Comment