diff options
author | Raúl Porcel <armin76@gentoo.org> | 2008-12-28 12:00:27 +0000 |
---|---|---|
committer | Raúl Porcel <armin76@gentoo.org> | 2008-12-28 12:00:27 +0000 |
commit | 50633c2149dc7a2454e8bbd44b03a0e516d6ef1b (patch) | |
tree | d5bb27fe1a09ae9486b13359af37aaf79938edb9 /net-p2p | |
parent | Initial import. (diff) | |
download | gentoo-2-50633c2149dc7a2454e8bbd44b03a0e516d6ef1b.tar.gz gentoo-2-50633c2149dc7a2454e8bbd44b03a0e516d6ef1b.tar.bz2 gentoo-2-50633c2149dc7a2454e8bbd44b03a0e516d6ef1b.zip |
Enhance init script, thanks to Alex Kravtsov and Kevin Bowling on bug #238733
(Portage version: 2.1.6.3/cvs/Linux 2.6.27-gentoo-r7 i686)
Diffstat (limited to 'net-p2p')
-rw-r--r-- | net-p2p/deluge/ChangeLog | 6 | ||||
-rw-r--r-- | net-p2p/deluge/files/deluged.conf | 3 | ||||
-rw-r--r-- | net-p2p/deluge/files/deluged.init | 25 |
3 files changed, 30 insertions, 4 deletions
diff --git a/net-p2p/deluge/ChangeLog b/net-p2p/deluge/ChangeLog index 6e83009016d4..c2f7d50ebac7 100644 --- a/net-p2p/deluge/ChangeLog +++ b/net-p2p/deluge/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for net-p2p/deluge # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-p2p/deluge/ChangeLog,v 1.104 2008/12/26 17:21:37 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/deluge/ChangeLog,v 1.105 2008/12/28 12:00:27 armin76 Exp $ + + 28 Dec 2008; Raúl Porcel <armin76@gentoo.org> files/deluged.conf, + files/deluged.init: + Enhance init script, thanks to Alex Kravtsov and Kevin Bowling on bug #238733 26 Dec 2008; Raúl Porcel <armin76@gentoo.org> deluge-1.1.0_rc1.ebuild: Change SRC_URI to bz2 diff --git a/net-p2p/deluge/files/deluged.conf b/net-p2p/deluge/files/deluged.conf index a09d559c273f..1d4714c2fe2f 100644 --- a/net-p2p/deluge/files/deluged.conf +++ b/net-p2p/deluge/files/deluged.conf @@ -2,3 +2,6 @@ # Change this to the user you want to run deluged as. # You may specify a group too, after a colon DELUGED_USER="" +DELUGEUI_START="false" +DELUGEUI_OPTS="-u web" + diff --git a/net-p2p/deluge/files/deluged.init b/net-p2p/deluge/files/deluged.init index 72307769d3c4..5ec69058ece4 100644 --- a/net-p2p/deluge/files/deluged.init +++ b/net-p2p/deluge/files/deluged.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Header: /var/cvsroot/gentoo-x86/net-p2p/deluge/files/deluged.init,v 1.2 2008/07/07 10:39:17 armin76 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-p2p/deluge/files/deluged.init,v 1.3 2008/12/28 12:00:27 armin76 Exp $ depend() { need net @@ -27,17 +27,28 @@ checkconfig() { eerror "Your group has to exist too!" return 1 fi - fi + fi return 0 } start() { checkconfig || return $? + DELUGED_USER_HOME=`getent passwd | grep $( echo "${DELUGED_USER}" | cut -d ':' -f 1 ) | cut -d ':' -f 6` ebegin "Starting Deluged" start-stop-daemon --start --user "${DELUGED_USER}" \ --name deluged --pidfile /var/run/deluged.pid --background --make-pidfile \ - --exec /usr/bin/deluged -- --do-not-daemonize "${DELUGED_OPTS}" + --exec /usr/bin/deluged -c "${DELUGED_USER}" -e HOME=${DELUGED_USER_HOME} -- --do-not-daemonize "${DELUGED_OPTS}" 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 -c "${DELUGED_USER}" \ + -e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS} + eend $? + fi } stop() { @@ -45,4 +56,12 @@ stop() { start-stop-daemon --stop --user "${DELUGED_USER}" \ --name deluged --pidfile /var/run/deluged.pid eend $? + + + if [[ "${DELUGEUI_START}" == "true" ]] ; then + ebegin "Stopping Deluge" + start-stop-daemon --stop --user "${DELUGED_USER}" \ + --name deluge --pidfile /var/run/deluge.pid + eend $? + fi } |