Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 500212

Summary: [funtoo-overlay overlay] init script loads SYNC-OPTS --nodaemon breaks webui btsync bittorrent-sync
Product: Gentoo Linux Reporter: f1r31c3r <f1r31c3r>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: alex_y_xu
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
URL: http://www.funtoo.org/Reporting_Bugs
Whiteboard:
Package list:
Runtime testing required: ---

Description f1r31c3r 2014-02-03 20:32:37 UTC
net-p2p/bittorrent-sync-1.2.82::funtoo-overlay


this ebuild works but the init script has config option passed that stops the daemon from loading.

#####################################
""Contents of /etc/init.d/btsync""
#####################################

#!/sbin/runscript
# Copyright (C) 2013 Jonathan Vasquez <jvasquez1011@gmail.com>
# Distributed under the terms of the Simplified BSD License.

NAME="BitTorrent Sync"
SYNC_NAME="btsync"
SYNC_PATH="/opt/${SYNC_NAME}/"
SYNC_BINARY="${SYNC_PATH}/${SYNC_NAME}"

####################################################################
#
#bellow is the effecting line, note: SYNC_OPTS containing --nodaemon.
#SYNC_OPTS="--nodaemon --config /etc/${SYNC_NAME}/config"
#
####################################################################

#Proposed fix is to either remove the offending line or just the --nodamon 
#option to allow the btsync to work and load the WebUI without problem.
#Unless there is a good reason for this option to be the way it is?

SYNC_PIDFILE="/var/run/${SYNC_NAME}.pid"

start() {
	ebegin "Starting ${NAME}"

	start-stop-daemon --start --exec "${SYNC_BINARY}" \
	   --pidfile "${SYNC_PIDFILE}" --background \
	   -- ${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 $?
}