add local overlay
This commit is contained in:
commit
4883c62e9a
68 changed files with 2719 additions and 0 deletions
16
net-p2p/syncthing/files/conf.d/syncthing
Normal file
16
net-p2p/syncthing/files/conf.d/syncthing
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
# Config file for /etc/init.d/syncthing
|
||||
|
||||
SYNC_NAME="syncthing"
|
||||
SYNC_PIDFILE="/var/run/${SYNC_NAME}.pid"
|
||||
|
||||
# If you are going to run syncthing as a user, also uncomment the SYNC_HOME line
|
||||
SYNC_USER="root"
|
||||
SYNC_GROUP="root"
|
||||
#SYNC_HOME="/home/${SYNC_USER}/.config/${SYNC_NAME}"
|
||||
|
||||
# Make sure SYNC_HOME is set to something so we reduce DRY here and in the init script
|
||||
SYNC_HOME="${SYNC_HOME:-/etc/${SYNC_NAME}}"
|
||||
|
||||
# Any options you want you can set them here
|
||||
SYNC_OPTS="--home=${SYNC_HOME}"
|
||||
|
||||
37
net-p2p/syncthing/files/init.d/syncthing
Normal file
37
net-p2p/syncthing/files/init.d/syncthing
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
#!/sbin/runscript
|
||||
|
||||
# Copyright 2014-2015 Jonathan Vasquez <jvasquez1011@gmail.com>
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
DISPLAY_NAME="SyncThing"
|
||||
|
||||
SYNC_PATH="/usr/bin"
|
||||
SYNC_BINARY="${SYNC_PATH}/${SYNC_NAME}"
|
||||
SYNC_USER="${SYNC_USER:-root}"
|
||||
SYNC_GROUP="${SYNC_GROUP:-root}"
|
||||
SYNC_HOME="${SYNC_HOME:-/etc/${SYNC_NAME}}"
|
||||
|
||||
start() {
|
||||
ebegin "Starting ${DISPLAY_NAME}"
|
||||
|
||||
if [[ ${SYNC_USER} == "root" ]]; then
|
||||
SYNC_NAME="root"
|
||||
SYNC_GROUP="root"
|
||||
|
||||
einfo "Running ${DISPLAY_NAME} as root:root. Home directory: ${SYNC_HOME}"
|
||||
fi
|
||||
|
||||
start-stop-daemon -m --pidfile "${SYNC_PIDFILE}" -b \
|
||||
--start --user ${SYNC_USER} --group ${SYNC_GROUP} --exec "${SYNC_BINARY}" -- ${SYNC_OPTS}
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping ${DISPLAY_NAME}"
|
||||
|
||||
start-stop-daemon --stop --exec "${SYNC_BINARY}" --pidfile "${SYNC_PIDFILE}"
|
||||
|
||||
eend $?
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue