version bump net-p2p/resilio-sync-2.7.0

This commit is contained in:
Micha Glave
2020-06-16 09:47:45 +02:00
parent 0342cbc952
commit 3ae6d592e2
12 changed files with 185 additions and 126 deletions

View File

@@ -1,12 +0,0 @@
# conf.d file for resilio-sync
# User and group daemon runs as
SYNC_USER="rslsync"
SYNC_GROUP="rslsync"
NAME="Resilio Sync"
SYNC_NAME="rslsync"
SYNC_PATH="/opt/resilio-sync"
SYNC_BINARY="${SYNC_PATH}/${SYNC_NAME}"
SYNC_OPTS="--config /etc/resilio-sync/config --storage /var/rslsync"
SYNC_PIDFILE="/run/resilio-sync/${SYNC_NAME}.pid"

View File

@@ -1,41 +0,0 @@
#!/sbin/openrc-run
# Copyright (C) 2013-2014 Jonathan Vasquez <fearedbliss@funtoo.org>
# Copyright (C) 2014 Sandy McArthur <Sandy@McArthur.org>
# Distributed under the terms of the Simplified BSD License.
depend() {
need localmount net
after bootmisc
}
start() {
ebegin "Starting ${NAME}"
mkdir -p $(dirname ${SYNC_PIDFILE})
chown ${SYNC_USER}:${SYNC_GROUP} $(dirname ${SYNC_PIDFILE})
start-stop-daemon \
--start \
--user "${SYNC_USER}" \
--group "${SYNC_GROUP}" \
--nice 5 \
--ionice 3 \
--exec "${SYNC_BINARY}" \
-- ${SYNC_OPTS}
eend $?
}
stop() {
ebegin "Stopping ${NAME}"
start-stop-daemon \
--stop \
--user "${SYNC_USER}" \
--group "${SYNC_GROUP}" \
--exec "${SYNC_BINARY}" \
--wait 5000 \
--retry SIGTERM/5
eend $?
}

View File

@@ -0,0 +1,12 @@
# Config file for /etc/init.d/resilio-sync
# Various options.
# run `rslsync --help` for valid cmdline options
#OPTS="--log /var/log/resilio-sync/resilio-sync.log"
# User and group daemon runs as
#USER="rslsync"
#GROUP="rslsync"
# Resilio Sync config file
#CONFIG="/etc/resilio-sync/config.json"

View File

@@ -0,0 +1,27 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
USER="${RC_SVCNAME##*.}"
command="/usr/bin/rslsync"
name="Resilio Sync for $USER"
description="Resilio Sync"
command_user="${USER:-rslsync}:${GROUP:-rslsync}"
pidfile="${PIDFILE:-/home/$USER/.config/resilio-sync/resilio-sync.pid}"
config="${CONFIG:-/home/$USER/.config/resilio-sync/config.json}"
command_args="--config $config ${OPTS}"
start_stop_daemon_args="-q"
retry="10"
depend() {
need net
}
start_pre() {
if [ "$USER" = "resilio-sync-user" ]; then
eerror "You are not supposed to run this script directly."
eerror "Create a symlink for this script:"
eerror " ln -s $RC_SVCNAME /etc/init.d/$RC_SVCNAME.<user>"
return 1
fi
}

View File

@@ -0,0 +1,13 @@
[Unit]
Description=Resilio Sync service
Documentation=https://help.resilio.com
After=network.target network-online.target
[Service]
Type=forking
Restart=on-failure
PIDFile=%h/.config/resilio-sync/resilio-sync.pid
ExecStart=/usr/bin/rslsync --config %h/.config/resilio-sync/config.json
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,12 @@
# Config file for /etc/init.d/resilio-sync
# Various options.
# run `rslsync --help` for valid cmdline options
OPTS="--log /var/log/resilio-sync/resilio-sync.log"
# User and group daemon runs as
RSLSYNC_USER="rslsync"
RSLSYNC_GROUP="rslsync"
# Resilio Sync config file
#CONFIG="/etc/resilio-sync/config.json"

View File

@@ -0,0 +1,17 @@
#!/sbin/openrc-run
# Copyright 1999-2018 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
command="/usr/bin/rslsync"
name="Resilio Sync"
description="Resilio Sync"
command_user="${RSLSYNC_USER:-rslsync}:${RSLSYNC_GROUP:-rslsync}"
pidfile="/run/resilio-sync/resilio-sync.pid"
config="${CONFIG:-/etc/resilio-sync/config.json}"
command_args="--config $config ${OPTS}"
start_stop_daemon_args="-q"
retry="10"
depend() {
need net
}

View File

@@ -0,0 +1,19 @@
[Unit]
Description=Resilio Sync service
Documentation=https://help.resilio.com
After=network.target network-online.target
[Service]
Type=forking
UMask=0002
Restart=on-failure
PermissionsStartOnly=true
User=rslsync
Group=rslsync
PIDFile=/var/run/resilio-sync/resilio-sync.pid
ExecStart=/usr/bin/rslsync --config /etc/resilio-sync/config.json
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1 @@
d /run/resilio-sync 0755 rslsync rslsync