From 9038357d78357db36a099926ea3596536879c353 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Thu, 10 Dec 2015 21:31:37 +0000 Subject: [PATCH] [OSX] Fix starting deluged from connection manager --- deluge/main.py | 2 +- deluge/ui/client.py | 2 -- osx/deluge | 5 ++++- osx/deluge-console | 5 ++++- osx/deluge-web | 5 ++++- osx/deluged | 5 ++++- 6 files changed, 17 insertions(+), 7 deletions(-) diff --git a/deluge/main.py b/deluge/main.py index 01744f4c3..26cbbbeb5 100644 --- a/deluge/main.py +++ b/deluge/main.py @@ -207,7 +207,7 @@ this should be an IP address", metavar="IFACE", # If the donot daemonize is set, then we just skip the forking if not options.donot: # Windows check, we log to the config folder by default - if deluge.common.windows_check() or deluge.common.osx_check(): + if deluge.common.windows_check(): open_logfile() write_pidfile() else: diff --git a/deluge/ui/client.py b/deluge/ui/client.py index 98a7bf7aa..662477a22 100644 --- a/deluge/ui/client.py +++ b/deluge/ui/client.py @@ -576,8 +576,6 @@ class Client(object): try: if deluge.common.windows_check(): subprocess.Popen(["deluged", "--port=%s" % port, "--config=%s" % config]) - elif deluge.common.osx_check(): - subprocess.call(["nohup", "deluged", "--port=%s" % port, "--config=%s" % config]) else: subprocess.call(["deluged", "--port=%s" % port, "--config=%s" % config]) except OSError, e: diff --git a/osx/deluge b/osx/deluge index d0041994c..bf8ba1ba5 100644 --- a/osx/deluge +++ b/osx/deluge @@ -41,6 +41,9 @@ PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" PYTHONPATH="$bundle_lib/pygtk/2.0:$PYTHONPATH" export PYTHONPATH +# Ensure deluged is available by adding macos dir to path. +PATH=$bundle_macos:$PATH + # We need a UTF-8 locale. lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` if test "$?" != "0"; then @@ -73,4 +76,4 @@ if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then fi # Note that we're calling $PYTHON here to override the version used. -$EXEC "$PYTHON" "$bundle_contents/MacOS/Deluge-bin" "$@" +$EXEC "$PYTHON" "$bundle_macos/Deluge-bin" "$@" diff --git a/osx/deluge-console b/osx/deluge-console index cd413a90d..331b72fbe 100755 --- a/osx/deluge-console +++ b/osx/deluge-console @@ -31,6 +31,9 @@ PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" export PYTHONPATH +# Ensure deluged is available by adding macos dir to path. +PATH=$bundle_macos:$PATH + # We need a UTF-8 locale. lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` if test "$?" != "0"; then @@ -63,4 +66,4 @@ if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then fi # Note that we're calling $PYTHON here to override the version used. -$EXEC "$PYTHON" "$bundle_contents/MacOS/deluge-console-bin" "$@" +$EXEC "$PYTHON" "$bundle_macos/deluge-console-bin" "$@" diff --git a/osx/deluge-web b/osx/deluge-web index 7d2a44a21..295950ab0 100755 --- a/osx/deluge-web +++ b/osx/deluge-web @@ -31,6 +31,9 @@ PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" export PYTHONPATH +# Ensure deluged is available by adding macos dir to path. +PATH=$bundle_macos:$PATH + # We need a UTF-8 locale. lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` if test "$?" != "0"; then @@ -63,4 +66,4 @@ if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then fi # Note that we're calling $PYTHON here to override the version used. -$EXEC "$PYTHON" "$bundle_contents/MacOS/deluge-web-bin" "$@" +$EXEC "$PYTHON" "$bundle_macos/deluge-web-bin" "$@" diff --git a/osx/deluged b/osx/deluged index 6fc404ac9..cc22596ad 100755 --- a/osx/deluged +++ b/osx/deluged @@ -31,6 +31,9 @@ PYTHONPATH="$bundle_lib/python/lib-dynload/:$PYTHONPATH" PYTHONPATH="$bundle_lib/python/:$PYTHONPATH" export PYTHONPATH +# Ensure deluged is available by adding macos dir to path. +PATH=$bundle_macos:$PATH + # We need a UTF-8 locale. lang=`defaults read .GlobalPreferences AppleLocale 2>/dev/null` if test "$?" != "0"; then @@ -63,4 +66,4 @@ if [ "x`echo "x$1" | sed -e "s/^x-psn_.*//"`" == "x" ]; then fi # Note that we're calling $PYTHON here to override the version used. -$EXEC "$PYTHON" "$bundle_contents/MacOS/deluged-bin" "$@" +$EXEC "$PYTHON" "$bundle_macos/deluged-bin" "$@"