public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Marek Szuba" <marecki@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/, net-p2p/syncthing/files/
Date: Thu, 27 Jan 2022 14:15:35 +0000 (UTC)	[thread overview]
Message-ID: <1643292928.a121cdb69c3887a83315cb88dbb285712176a779.marecki@gentoo> (raw)

commit:     a121cdb69c3887a83315cb88dbb285712176a779
Author:     Marek Szuba <marecki <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 27 14:11:01 2022 +0000
Commit:     Marek Szuba <marecki <AT> gentoo <DOT> org>
CommitDate: Thu Jan 27 14:15:28 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a121cdb6

net-p2p/syncthing: make syncthing OpenRC service ready for multiple instances

Thanks-to: Till Schäfer <till2.schaefer <AT> uni-dortmund.de>
Closes: https://bugs.gentoo.org/831735
Signed-off-by: Marek Szuba <marecki <AT> gentoo.org>

 net-p2p/syncthing/files/syncthing.confd            |  4 +++
 net-p2p/syncthing/files/syncthing.initd-r2         | 33 ++++++++++++++++++++++
 ...ng-1.18.6.ebuild => syncthing-1.18.6-r1.ebuild} |  2 +-
 3 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/net-p2p/syncthing/files/syncthing.confd b/net-p2p/syncthing/files/syncthing.confd
index 33773dc7fdf9..eb70f1adef95 100644
--- a/net-p2p/syncthing/files/syncthing.confd
+++ b/net-p2p/syncthing/files/syncthing.confd
@@ -20,5 +20,9 @@
 # Nice level of syncthing
 #SYNCTHING_NICE="0"
 
+# Where the syncthing GUI should listen. Can be a http(s) URI or a Unix domain socket
+#SYNCTHING_GUI_ADDRESS="http://127.0.0.1:8384"
+#SYNCTHING_GUI_ADDRESS="unix:/run/syncthing.sock"
+
 # Extra options for syncthing
 #SYNCTHING_OPTS=""

diff --git a/net-p2p/syncthing/files/syncthing.initd-r2 b/net-p2p/syncthing/files/syncthing.initd-r2
new file mode 100644
index 000000000000..d8e46180df12
--- /dev/null
+++ b/net-p2p/syncthing/files/syncthing.initd-r2
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+SYNCTHING_USER=${SYNCTHING_USER:-syncthing}
+SYNCTHING_GROUP=${SYNCTHING_GROUP:-syncthing}
+SYNCTHING_HOMEDIR=${SYNCTHING_HOMEDIR:-/var/lib/syncthing/.config/syncthing}
+SYNCTHING_LOGFILE=${SYNCTHING_LOGFILE:-/var/log/syncthing/syncthing.log}
+SYNCTHING_UMASK=${SYNCTHING_UMASK:-007}
+SYNCTHING_IONICE=${SYNCTHING_IONICE:-0}
+SYNCTHING_NICE=${SYNCTHING_NICE:-0}
+SYNCTHING_GUI_ADDRESS=${SYNCTHING_GUI_ADDRESS:-http://127.0.0.1:8384}
+
+description="Syncthing is an open, trustworthy and decentralized cloud storage system"
+command="/usr/bin/syncthing"
+command_args="-no-browser -home=${SYNCTHING_HOMEDIR} -gui-address=${SYNCTHING_GUI_ADDRESS} ${SYNCTHING_OPTS}"
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background="yes"
+command_user="${SYNCTHING_USER}:${SYNCTHING_GROUP}"
+umask="${SYNCTHING_UMASK}"
+start_stop_daemon_args="--ionice ${SYNCTHING_IONICE} \
+  --nicelevel ${SYNCTHING_NICE}"
+output_log="\"${SYNCTHING_LOGFILE}\""
+error_log="\"${SYNCTHING_LOGFILE}\""
+
+depend() {
+  need localmount net
+}
+
+start_pre() {
+  checkpath -q -d -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_HOMEDIR}
+  checkpath -q -f -o ${SYNCTHING_USER}:${SYNCTHING_GROUP} ${SYNCTHING_LOGFILE}
+}

diff --git a/net-p2p/syncthing/syncthing-1.18.6.ebuild b/net-p2p/syncthing/syncthing-1.18.6-r1.ebuild
similarity index 99%
rename from net-p2p/syncthing/syncthing-1.18.6.ebuild
rename to net-p2p/syncthing/syncthing-1.18.6-r1.ebuild
index e7512849c254..dfa6d9a4188d 100644
--- a/net-p2p/syncthing/syncthing-1.18.6.ebuild
+++ b/net-p2p/syncthing/syncthing-1.18.6-r1.ebuild
@@ -855,7 +855,7 @@ src_install() {
 	systemd_dounit etc/linux-systemd/system/${PN}{@,-resume}.service
 	systemd_douserunit etc/linux-systemd/user/${PN}.service
 	newconfd "${FILESDIR}"/${PN}.confd ${PN}
-	newinitd "${FILESDIR}"/${PN}.initd-r1 ${PN}
+	newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
 
 	keepdir /var/log/${PN}
 	insinto /etc/logrotate.d


             reply	other threads:[~2022-01-27 14:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 14:15 Marek Szuba [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-09-09 23:18 [gentoo-commits] repo/gentoo:master commit in: net-p2p/syncthing/, net-p2p/syncthing/files/ Sam James
2025-09-08  7:10 Marc Schiffbauer
2025-05-06 18:54 Marc Schiffbauer
2022-02-03 15:31 Marek Szuba
2021-12-09 12:03 Marek Szuba
2020-04-17 17:58 Marek Szuba
2019-05-24 11:13 Marek Szuba
2017-05-22 10:36 Marek Szuba
2016-08-17 17:36 Dirkjan Ochtman
2016-07-27 20:19 Dirkjan Ochtman
2016-06-27 15:20 Göktürk Yüksek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1643292928.a121cdb69c3887a83315cb88dbb285712176a779.marecki@gentoo \
    --to=marecki@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox