Summary: | =net-p2p/deluge-1.3.6 - Init script doesn't start deluge; the deluge process name is not "deluged", removing "--name deluged" argument fixes it | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Craig Andrews <candrews> |
Component: | Current packages | Assignee: | Paolo Pedroni <paolo.pedroni> |
Status: | RESOLVED WORKSFORME | ||
Severity: | normal | CC: | candrews, net-p2p |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Craig Andrews
2013-10-20 01:35:12 UTC
I was too quick with my original solution; it doesn't work either. The reason is that /usr/bin/deluged forks off another script, which has it's own pid, so when start-stop-daemon creates the pid file it's for /usr/bin/deluged (which immediately terminates) and not what we really want. This is also why the currently in portage init script doesn't work. This is what I'm using now for the "start()" block, and it seems to be working well: start() { checkconfig || return $? if [ "${DELUGED_HOME}" = "" ] ; then DELUGED_USER_HOME=$(getent passwd "${DELUGED_USER%:*}" | cut -d ':' -f 6) else DELUGED_USER_HOME=${DELUGED_HOME} fi ebegin "Starting Deluged" touch /var/run/deluged.pid chown p2p /var/run/deluged.pid start-stop-daemon --start --user "${DELUGED_USER%:*}" -e HOME="${DELUGED_USER_HOME}" \ --exec /usr/bin/deluged -- --pidfile /var/run/deluged.pid "${DELUGED_OPTS}" chown root /var/run/deluged.pid eend $? if [ "${DELUGEUI_START}" = "true" ] ; then ebegin "Starting Deluge" start-stop-daemon --start --background --pidfile \ /var/run/deluge.pid --make-pidfile \ --exec /usr/bin/deluge --user "${DELUGED_USER%:*}" \ -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} eend $? fi } This approach has deluge create its own pid file, and start-stop-daemon uses it. Is this still a problem? I tried today and it worked right fine with the original init file. Please reopen if you still have problems. |