diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-02 21:45:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-02 21:45:28 +0100 |
commit | 2018227e9344edb9da15fc6a4a8298086cc2aa77 (patch) | |
tree | c18e1c09e605e94e2a1e93345ad25746cc9e14b9 /net-p2p/syncthing/files | |
parent | 6f8038813c460b4f0572d5ef595cdfa94af3a94d (diff) |
gentoo resync : 02.06.2019
Diffstat (limited to 'net-p2p/syncthing/files')
-rw-r--r-- | net-p2p/syncthing/files/stdiscosrv.confd | 3 | ||||
-rw-r--r-- | net-p2p/syncthing/files/stdiscosrv.initd | 30 | ||||
-rw-r--r-- | net-p2p/syncthing/files/stdiscosrv.logrotate | 6 | ||||
-rw-r--r-- | net-p2p/syncthing/files/stdiscosrv.service | 17 |
4 files changed, 56 insertions, 0 deletions
diff --git a/net-p2p/syncthing/files/stdiscosrv.confd b/net-p2p/syncthing/files/stdiscosrv.confd new file mode 100644 index 000000000000..e40a4b931db7 --- /dev/null +++ b/net-p2p/syncthing/files/stdiscosrv.confd @@ -0,0 +1,3 @@ +# Options to pass to discosrv +# see /usr/libexec/syncthing/stdiscosrv --help for more information +SD_OPTS= diff --git a/net-p2p/syncthing/files/stdiscosrv.initd b/net-p2p/syncthing/files/stdiscosrv.initd new file mode 100644 index 000000000000..333b980897b3 --- /dev/null +++ b/net-p2p/syncthing/files/stdiscosrv.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 +SD_USER=stdiscosrv +SD_GROUP=stdiscosrv +SD_HOMEDIR=/var/lib/stdiscosrv +SD_LOGFILE=/var/log/syncthing/stdiscosrv.log + + +description="Discovery service for syncthing" +command="/usr/libexec/syncthing/stdiscosrv" +command_args="${SD_OPTS}" +pidfile="/run/stdiscosrv.pid" +start_stop_daemon_args="--background + --user ${SD_USER} + --group ${SD_GROUP} + --chdir \"${SD_HOMEDIR}\" + --make-pidfile + --stdout \"${SD_LOGFILE}\" + --stderr \"${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/stdiscosrv.logrotate b/net-p2p/syncthing/files/stdiscosrv.logrotate new file mode 100644 index 000000000000..406a1122a240 --- /dev/null +++ b/net-p2p/syncthing/files/stdiscosrv.logrotate @@ -0,0 +1,6 @@ +/var/log/syncthing/stdiscosrv.log { + missingok + notifempty + sharedscripts + copytruncate +} diff --git a/net-p2p/syncthing/files/stdiscosrv.service b/net-p2p/syncthing/files/stdiscosrv.service new file mode 100644 index 000000000000..4011c7d4c5bd --- /dev/null +++ b/net-p2p/syncthing/files/stdiscosrv.service @@ -0,0 +1,17 @@ +[Unit] +Description=Syncthing discovery server +After=network.target + +[Service] +User=stdiscosrv +Group=stdiscosrv +ExecStart=/usr/libexec/syncthing/stdiscosrv +WorkingDirectory=/var/lib/stdiscosrv + +PrivateTmp=true +ProtectSystem=full +ProtectHome=true +NoNewPrivileges=true + +[Install] +WantedBy=multi-user.target |