summaryrefslogtreecommitdiffstats
path: root/extra/deluge
diff options
context:
space:
mode:
authortnut <thierryn1 at hispeed dot ch>2010-10-14 22:44:30 +0200
committertnut <thierryn1 at hispeed dot ch>2010-10-14 22:44:30 +0200
commitb82b50db0150ed3297150798c5e8eaa2872d2f99 (patch)
tree50ff0b24e018b3a85482b052fa844af1efd1f41b /extra/deluge
parent3a051c22ebebc88a8c6dd9c169a2cbed103eaa98 (diff)
downloadnutyx-pakxe-b82b50db0150ed3297150798c5e8eaa2872d2f99.tar.gz
nutyx-pakxe-b82b50db0150ed3297150798c5e8eaa2872d2f99.tar.bz2
nutyx-pakxe-b82b50db0150ed3297150798c5e8eaa2872d2f99.tar.xz
nutyx-pakxe-b82b50db0150ed3297150798c5e8eaa2872d2f99.zip
deluge, port nettoyé
Diffstat (limited to 'extra/deluge')
-rw-r--r--extra/deluge/.directory5
-rw-r--r--extra/deluge/deluge-web43
-rw-r--r--extra/deluge/deluge.install30
-rw-r--r--extra/deluge/deluged44
-rw-r--r--extra/deluge/deluged.conf.d2
-rw-r--r--extra/deluge/fix_freeze.patch74
6 files changed, 0 insertions, 198 deletions
diff --git a/extra/deluge/.directory b/extra/deluge/.directory
deleted file mode 100644
index bb9306947..000000000
--- a/extra/deluge/.directory
+++ /dev/null
@@ -1,5 +0,0 @@
-[Dolphin]
-Timestamp=2010,6,5,10,7,37
-
-[Settings]
-ShowDotFiles=true
diff --git a/extra/deluge/deluge-web b/extra/deluge/deluge-web
deleted file mode 100644
index cc20616d8..000000000
--- a/extra/deluge/deluge-web
+++ /dev/null
@@ -1,43 +0,0 @@
-
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/deluged
-
-[[ -f /var/run/deluge-web.pid ]] && PID=$(cat /var/run/deluge-web.pid)
-[[ -d /proc/$PID ]] || PID=
-
-case "$1" in
- start)
- stat_busy "Starting Deluge WebUI"
- [[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluge-web -f >/dev/null" $DELUGE_USER
- if [ $? -gt 0 ]; then
- stat_fail
- else
- sleep 1
- echo $(pgrep -u $DELUGE_USER deluge-web) > /var/run/deluge-web.pid
- add_daemon deluge-web
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping Deluge WebUI"
- [[ ! -z $PID ]] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm /var/run/deluge-web.pid
- rm_daemon deluge-web
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
diff --git a/extra/deluge/deluge.install b/extra/deluge/deluge.install
deleted file mode 100644
index 647d995dc..000000000
--- a/extra/deluge/deluge.install
+++ /dev/null
@@ -1,30 +0,0 @@
-
-post_install() {
- getent group deluge >/dev/null 2>&1 || usr/sbin/groupadd -g 125 deluge
- if getent passwd deluge > /dev/null 2>&1; then
- usr/sbin/usermod -c 'Deluge user' -d /srv/deluge -s /bin/false deluge > /dev/null 2>&1
- else
- usr/sbin/useradd -c 'Deluge user' -u 125 -g deluge -d /srv/deluge -s /bin/false deluge
- fi
- usr/bin/passwd -l deluge &>/dev/null
-
- chown deluge.deluge srv/deluge -R
- xdg-icon-resource forceupdate --theme hicolor &> /dev/null
-
-cat << _EOF
->>> Deluge's daemon is running default with the "deluge" user. The default download directory is /srv/deluge/.
- You can change the user by editing /etc/conf.d/deluged
-_EOF
-}
-
-post_upgrade() {
- post_install $1
-}
-
-pre_remove() {
- getent passwd deluge >/dev/null 2>&1 && userdel deluge
- getent group deluge >/dev/null 2>&1 && groupdel deluge
-
- xdg-icon-resource forceupdate --theme hicolor &> /dev/null
-}
-
diff --git a/extra/deluge/deluged b/extra/deluge/deluged
deleted file mode 100644
index a7b4913aa..000000000
--- a/extra/deluge/deluged
+++ /dev/null
@@ -1,44 +0,0 @@
-
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-. /etc/conf.d/deluged
-
-[[ -f /var/run/deluged.pid ]] && PID=$(cat /var/run/deluged.pid)
-[[ -d /proc/$PID ]] || PID=
-
-case "$1" in
- start)
- stat_busy "Starting Deluge Daemon"
- [[ -z $PID ]] && su -l -s /bin/sh -c "/usr/bin/deluged >/dev/null" $DELUGE_USER
- if [ $? -gt 0 ]; then
- stat_fail
- else
- sleep 1
- echo $(pgrep -u $DELUGE_USER deluged) > /var/run/deluged.pid
- add_daemon deluged
- stat_done
- fi
- ;;
- stop)
- stat_busy "Stopping Deluge Daemon"
- [[ ! -z $PID ]] && kill $PID &> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- else
- rm /var/run/deluged.pid
- rm_daemon deluged
- stat_done
- fi
- ;;
- restart)
- $0 stop
- sleep 1
- $0 start
- ;;
- *)
- echo "usage: $0 {start|stop|restart}"
-esac
-exit 0
-
diff --git a/extra/deluge/deluged.conf.d b/extra/deluge/deluged.conf.d
deleted file mode 100644
index b421510b5..000000000
--- a/extra/deluge/deluged.conf.d
+++ /dev/null
@@ -1,2 +0,0 @@
-
-DELUGE_USER="deluge"
diff --git a/extra/deluge/fix_freeze.patch b/extra/deluge/fix_freeze.patch
deleted file mode 100644
index 2991ca770..000000000
--- a/extra/deluge/fix_freeze.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-
-diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py
-index 554c570..3b9ddf4 100644
---- a/deluge/ui/gtkui/connectionmanager.py
-+++ b/deluge/ui/gtkui/connectionmanager.py
-@@ -99,12 +99,16 @@ class ConnectionManager(component.Component):
-
- self.config = ConfigManager("hostlist.conf.1.2", DEFAULT_CONFIG)
-
-+ self.running = False
-+
- # Component overrides
- def start(self):
- pass
-
- def stop(self):
-- pass
-+ # Close this dialog when we are shutting down
-+ if self.running:
-+ self.connection_manager.response(gtk.RESPONSE_CLOSE)
-
- def shutdown(self):
- pass
-diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py
-index 255622a..4856986 100644
---- a/deluge/ui/gtkui/gtkui.py
-+++ b/deluge/ui/gtkui/gtkui.py
-@@ -167,7 +167,7 @@ class GtkUI(object):
- self.gnome_prog = gnome.init("Deluge", deluge.common.get_version())
- self.gnome_client = gnome.ui.master_client()
- def on_die(*args):
-- gtk.main_quit()
-+ reactor.stop()
- self.gnome_client.connect("die", on_die)
- log.debug("GNOME session 'die' handler registered!")
- except Exception, e:
-@@ -180,7 +180,7 @@ class GtkUI(object):
- def win_handler(ctrl_type):
- log.debug("ctrl_type: %s", ctrl_type)
- if ctrl_type in (CTRL_CLOSE_EVENT, CTRL_SHUTDOWN_EVENT):
-- gtk.main_quit()
-+ reactor.stop()
- return 1
- SetConsoleCtrlHandler(win_handler)
-
-diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py
-index ad33fd0..1153b1e 100644
---- a/deluge/ui/gtkui/mainwindow.py
-+++ b/deluge/ui/gtkui/mainwindow.py
-@@ -46,6 +46,7 @@ from deluge.ui.client import client
- import deluge.component as component
- from deluge.configmanager import ConfigManager
- from deluge.ui.gtkui.ipcinterface import process_args
-+from twisted.internet import reactor
-
- import deluge.common
- import common
-@@ -152,7 +153,7 @@ class MainWindow(component.Component):
- return self.main_glade
-
- def quit(self):
-- gtk.main_quit()
-+ reactor.stop()
-
- def load_window_state(self):
- x = self.config["window_x_pos"]
-@@ -238,7 +239,6 @@ class MainWindow(component.Component):
-
- def on_newversionavailable_event(self, new_version):
- if self.config["show_new_releases"]:
-- from twisted.internet import reactor
- from deluge.ui.gtkui.new_release_dialog import NewReleaseDialog
- reactor.callLater(5.0, NewReleaseDialog().show, new_version)
- \ No newline at end of file