@@ -, +, @@ Alter the config and init files to support the newer ui specific binaries (deluge-web|deluge-console|deluge-gtk) Leaving the DELUGEUI_TYPE field blank, and maintaining the original DELUGEUI_OPT variable, should retain normal functionality for older versions --- net-p2p/deluge/files/deluged.conf | 2 ++ net-p2p/deluge/files/deluged.init | 26 ++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) --- a/net-p2p/deluge/files/deluged.conf +++ a/net-p2p/deluge/files/deluged.conf @@ -3,5 +3,7 @@ # You may specify a group too, after a colon DELUGED_USER="" DELUGEUI_START="false" +# Deluge UI type. One of [web|console|gtk]. Leave this field blank if you are not using the latest version +DELUGEUI_TYPE="" DELUGEUI_OPTS="-u web" --- a/net-p2p/deluge/files/deluged.init +++ a/net-p2p/deluge/files/deluged.init @@ -46,12 +46,15 @@ start() { if [[ "${DELUGEUI_START}" == "true" ]] ; then - ebegin "Starting Deluge" - start-stop-daemon --start --background --pidfile \ - /var/run/deluge.pid --make-pidfile \ - --exec /usr/bin/deluge -c "${DELUGED_USER}" \ - -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} - eend $? + DELUGEUI_BINARY="$(which deluge-${DELUGEUI_TYPE})" + if [[ -x ${DELUGEUI_BINARY} ]] ; then + ebegin "Starting Deluge UI" + start-stop-daemon --start --background --pidfile \ + /var/run/deluge.pid --make-pidfile \ + --exec ${DELUGEUI_BINARY} -c "${DELUGED_USER}" \ + -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} + eend $? + fi fi } @@ -63,9 +66,12 @@ stop() { if [[ "${DELUGEUI_START}" == "true" ]] ; then - ebegin "Stopping Deluge" - start-stop-daemon --stop --user "${DELUGED_USER}" \ - --name deluge --pidfile /var/run/deluge.pid - eend $? + DELUGEUI_BINARY="$(which deluge-${DELUGEUI_TYPE})" + if [[ -x ${DELUGEUI_BINARY} ]] ; then + ebegin "Stopping Deluge UI" + start-stop-daemon --stop --user "${DELUGED_USER}" \ + --name ${DELUGEUI_BINARY} --pidfile /var/run/deluge.pid + eend $? + fi fi } --