Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 500212 - [funtoo-overlay overlay] init script loads SYNC-OPTS --nodaemon breaks webui btsync bittorrent-sync
Summary: [funtoo-overlay overlay] init script loads SYNC-OPTS --nodaemon breaks webui ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Linux bug wranglers
URL: http://www.funtoo.org/Reporting_Bugs
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-03 20:32 UTC by f1r31c3r
Modified: 2014-02-04 07:18 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 $?
}