diff options
author | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2021-12-22 14:08:05 +0000 |
commit | 93a93e9a3b53c1a73142a305ea1f8136846942ee (patch) | |
tree | b9791a06ab3284e27b568412c59316c66240c682 /net-p2p/syncthing/files | |
parent | 2771f79232c273bc2a57d23bf335dd81ccf6af28 (diff) |
gentoo resync : 22.12.2021
Diffstat (limited to 'net-p2p/syncthing/files')
-rw-r--r-- | net-p2p/syncthing/files/stdiscosrv.initd-r1 | 27 | ||||
-rw-r--r-- | net-p2p/syncthing/files/strelaysrv.initd-r1 | 27 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing-1.18.4-tool_users.patch | 25 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing.initd-r1 | 32 |
4 files changed, 111 insertions, 0 deletions
diff --git a/net-p2p/syncthing/files/stdiscosrv.initd-r1 b/net-p2p/syncthing/files/stdiscosrv.initd-r1 new file mode 100644 index 000000000000..fee01c489893 --- /dev/null +++ b/net-p2p/syncthing/files/stdiscosrv.initd-r1 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +SD_USER=stdiscosrv +SD_GROUP=syncthing +SD_HOMEDIR=/var/lib/syncthing-discosrv +SD_LOGFILE=/var/log/syncthing/discosrv.log + + +description="Discovery service for syncthing" +command="/usr/libexec/syncthing/stdiscosrv" +command_args="${SD_OPTS}" +pidfile="/run/syncthing-discosrv.pid" +command_background="yes" +command_user="${SD_USER}:${SD_GROUP}" +directory="${SD_HOMEDIR}" +output_log="${SD_LOGFILE}" +error_log="${SD_LOGFILE}" + +depend() { + need net +} + +start_pre() { + checkpath -q -d -o ${SD_USER}:${SD_GROUP} ${SD_HOMEDIR} + checkpath -q -f -o ${SD_USER}:${SD_GROUP} ${SD_LOGFILE} +} diff --git a/net-p2p/syncthing/files/strelaysrv.initd-r1 b/net-p2p/syncthing/files/strelaysrv.initd-r1 new file mode 100644 index 000000000000..3a8b36eda99c --- /dev/null +++ b/net-p2p/syncthing/files/strelaysrv.initd-r1 @@ -0,0 +1,27 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +SR_USER=strelaysrv +SR_GROUP=syncthing +SR_HOMEDIR=/var/lib/syncthing-relaysrv +SR_LOGFILE=/var/log/syncthing/relaysrv.log + + +description="Relay service for syncthing" +command="/usr/libexec/syncthing/strelaysrv" +command_args="${SR_OPTS}" +pidfile="/run/syncthing-relaysrv.pid" +command_background="yes" +command_user="${SR_USER}:${SR_GROUP}" +directory="${SR_HOMEDIR}" +output_log="${SR_LOGFILE}" +error_log="${SR_LOGFILE}" + +depend() { + need net +} + +start_pre() { + checkpath -q -d -o ${SR_USER}:${SR_GROUP} ${SR_HOMEDIR} + checkpath -q -f -o ${SR_USER}:${SR_GROUP} ${SR_LOGFILE} +} diff --git a/net-p2p/syncthing/files/syncthing-1.18.4-tool_users.patch b/net-p2p/syncthing/files/syncthing-1.18.4-tool_users.patch new file mode 100644 index 000000000000..a0237884bf21 --- /dev/null +++ b/net-p2p/syncthing/files/syncthing-1.18.4-tool_users.patch @@ -0,0 +1,25 @@ +Let us save ourselves the pain of messing with renamed system accounts +use the old names, for now at least. + +--- a/cmd/stdiscosrv/etc/linux-systemd/stdiscosrv.service ++++ b/cmd/stdiscosrv/etc/linux-systemd/stdiscosrv.service +@@ -9,7 +9,7 @@ + ExecStart=/usr/bin/stdiscosrv $DISCOSRV_OPTS + + # Hardening +-User=syncthing-discosrv ++User=stdiscosrv + Group=syncthing + ProtectSystem=strict + ReadWritePaths=/var/lib/syncthing-discosrv +--- a/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service ++++ b/cmd/strelaysrv/etc/linux-systemd/strelaysrv.service +@@ -9,7 +9,7 @@ + ExecStart=/usr/bin/strelaysrv -nat=${NAT} $RELAYSRV_OPTS + + # Hardening +-User=syncthing-relaysrv ++User=strelaysrv + Group=syncthing + ProtectSystem=strict + ReadWritePaths=/var/lib/syncthing-relaysrv diff --git a/net-p2p/syncthing/files/syncthing.initd-r1 b/net-p2p/syncthing/files/syncthing.initd-r1 new file mode 100644 index 000000000000..cc7e1b75e985 --- /dev/null +++ b/net-p2p/syncthing/files/syncthing.initd-r1 @@ -0,0 +1,32 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 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} + +description="Syncthing is an open, trustworthy and decentralized cloud storage system" +command="/usr/bin/syncthing" +command_args="-no-browser -home=${SYNCTHING_HOMEDIR} ${SYNCTHING_OPTS}" +pidfile="/run/syncthing.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} +} |