diff options
author | Dirkjan Ochtman <djc@gentoo.org> | 2016-06-24 22:04:51 +0200 |
---|---|---|
committer | Dirkjan Ochtman <djc@gentoo.org> | 2016-06-24 22:04:51 +0200 |
commit | 7deebb7157b1b7713488676ad049926f6aaf7217 (patch) | |
tree | 2b51b09b6c7926566837359d377377fd3cf18175 /net-p2p/syncthing/files | |
parent | mail-filter/rspamd: remove old versions (diff) | |
download | gentoo-7deebb7157b1b7713488676ad049926f6aaf7217.tar.gz gentoo-7deebb7157b1b7713488676ad049926f6aaf7217.tar.bz2 gentoo-7deebb7157b1b7713488676ad049926f6aaf7217.zip |
net-p2p/syncthing: add tools flag
Thanks to Alexey Korepanov for implementing this.
Package-Manager: portage-2.2.28
Diffstat (limited to 'net-p2p/syncthing/files')
-rw-r--r-- | net-p2p/syncthing/files/relaysrv.systemd.patch | 13 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing-relaysrv.confd | 3 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing-relaysrv.initd | 30 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing-relaysrv.logrotate | 6 | ||||
-rw-r--r-- | net-p2p/syncthing/files/syncthing.logrotate | 5 |
5 files changed, 53 insertions, 4 deletions
diff --git a/net-p2p/syncthing/files/relaysrv.systemd.patch b/net-p2p/syncthing/files/relaysrv.systemd.patch new file mode 100644 index 000000000000..2cff1dc7d9a6 --- /dev/null +++ b/net-p2p/syncthing/files/relaysrv.systemd.patch @@ -0,0 +1,13 @@ +diff --git src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service +index b9d3173..7f8e2c0 100644 +--- src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service ++++ src/github.com/syncthing/syncthing/cmd/relaysrv/etc/linux-systemd/syncthing-relaysrv.service +@@ -5,7 +5,7 @@ After=network.target + [Service] + User=syncthing-relaysrv + Group=syncthing-relaysrv +-ExecStart=/usr/bin/relaysrv ++ExecStart=/usr/libexec/syncthing/relaysrv + WorkingDirectory=/var/lib/syncthing-relaysrv + + PrivateTmp=true diff --git a/net-p2p/syncthing/files/syncthing-relaysrv.confd b/net-p2p/syncthing/files/syncthing-relaysrv.confd new file mode 100644 index 000000000000..2effc3997209 --- /dev/null +++ b/net-p2p/syncthing/files/syncthing-relaysrv.confd @@ -0,0 +1,3 @@ +# Options to pass to relaysrv +# see relaysrv --help for more information +SR_OPTS= diff --git a/net-p2p/syncthing/files/syncthing-relaysrv.initd b/net-p2p/syncthing/files/syncthing-relaysrv.initd new file mode 100644 index 000000000000..860c5f38aa8d --- /dev/null +++ b/net-p2p/syncthing/files/syncthing-relaysrv.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +SR_USER=syncthing-relaysrv +SR_GROUP=syncthing-relaysrv +SR_HOMEDIR=/var/lib/syncthing-relaysrv +SR_LOGFILE=/var/log/syncthing/relaysrv.log + + +description="Relay service for syncthing" +command="/usr/libexec/syncthing/relaysrv" +command_args="${SR_OPTS}" +pidfile="/run/relaysrv.pid" +start_stop_daemon_args="--background + --user ${SR_USER} + --group ${SR_GROUP} + --chdir \"${SR_HOMEDIR}\" + --make-pidfile + --stdout \"${SR_LOGFILE}\" + --stderr \"${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-relaysrv.logrotate b/net-p2p/syncthing/files/syncthing-relaysrv.logrotate new file mode 100644 index 000000000000..f168cbfc413e --- /dev/null +++ b/net-p2p/syncthing/files/syncthing-relaysrv.logrotate @@ -0,0 +1,6 @@ +/var/log/syncthing/relaysrv.log { + missingok + notifempty + sharedscripts + copytruncate +} diff --git a/net-p2p/syncthing/files/syncthing.logrotate b/net-p2p/syncthing/files/syncthing.logrotate index 37c43209a120..11310e381afd 100644 --- a/net-p2p/syncthing/files/syncthing.logrotate +++ b/net-p2p/syncthing/files/syncthing.logrotate @@ -2,8 +2,5 @@ missingok notifempty sharedscripts - postrotate - kill -0 $(</run/syncthing.pid) && \ - /etc/init.d/syncthing restart > /dev/null 2>&1 || true - endscript + copytruncate } |