net-p2p/btsync: added config and service files from pigfoot
Package-Manager: portage-2.2.26
This commit is contained in:
parent
717bb26f77
commit
2e123ca6e5
3
net-p2p/btsync/ChangeLog
Normal file
3
net-p2p/btsync/ChangeLog
Normal file
@ -0,0 +1,3 @@
|
||||
13 Jan 2016; <chymera@gentoo.org> +files/btsync.conf, +files/init.d/btsync,
|
||||
+files/systemd/btsync.service:
|
||||
net-p2p/btsync: added config and service files from pigfoot
|
20
net-p2p/btsync/files/btsync.conf
Normal file
20
net-p2p/btsync/files/btsync.conf
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"device_name": "Gentoo",
|
||||
"listening_port" : 0,
|
||||
|
||||
"storage_path" : "/var/lib/btsync",
|
||||
"pid_file" : "/var/run/btsync/btsync.pid",
|
||||
|
||||
"check_for_updates" : true,
|
||||
"use_upnp" : true,
|
||||
|
||||
"download_limit" : 0,
|
||||
"upload_limit" : 0,
|
||||
|
||||
"webui" :
|
||||
{
|
||||
"listen" : "127.0.0.1:8888",
|
||||
"login" : "admin",
|
||||
"password" : "admin"
|
||||
}
|
||||
}
|
44
net-p2p/btsync/files/init.d/btsync
Normal file
44
net-p2p/btsync/files/init.d/btsync
Normal file
@ -0,0 +1,44 @@
|
||||
#!/sbin/runscript
|
||||
|
||||
# Copyright 2013-2014 Jonathan Vasquez <jvasquez1011@gmail.com>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
NAME="BitTorrent Sync"
|
||||
SYNC_NAME="btsync"
|
||||
SYNC_PATH="/opt/${SYNC_NAME}/"
|
||||
SYNC_BINARY="${SYNC_PATH}/${SYNC_NAME}"
|
||||
SYNC_OPTS="--nodaemon --config /etc/${SYNC_NAME}/btsync.conf"
|
||||
SYNC_PIDFILE="/var/run/${SYNC_NAME}/${SYNC_NAME}.pid"
|
||||
SYNC_USER=${SYNC_USER:-btsync}
|
||||
SYNC_GROUP=${SYNC_GROUP:-btsync}
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${NAME}"
|
||||
|
||||
# Sets the umask for the process so that btsync creates files
|
||||
# with group write permissions
|
||||
start-stop-daemon --start --exec "${SYNC_BINARY}" \
|
||||
--pidfile "${SYNC_PIDFILE}" --background \
|
||||
--user "${SYNC_USER}" --group "${SYNC_GROUP}" \
|
||||
-- ${SYNC_OPTS}
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${NAME}"
|
||||
|
||||
start-stop-daemon --stop --exec "${SYNC_BINARY}" \
|
||||
--pidfile "${SYNC_PIDFILE}"
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ${NAME}"
|
||||
|
||||
start-stop-daemon --signal HUP --exec "${SYNC_BINARY}" \
|
||||
--pidfile "${SYNC_PIDFILE}"
|
||||
|
||||
eend $?
|
||||
}
|
14
net-p2p/btsync/files/systemd/btsync.service
Normal file
14
net-p2p/btsync/files/systemd/btsync.service
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright 2014-2016 Jonathan Vasquez <jvasquez1011@gmail.com>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
[Unit]
|
||||
Description=BitTorrent Sync
|
||||
After=systemd-udev-settle.target local-fs.target zfs.service
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
ExecStart=/opt/btsync/btsync --config /etc/btsync/config
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
Loading…
x
Reference in New Issue
Block a user