Skip to content

Commit

Permalink
net-p2p/deluge: Fix deluge-web systemd service unit
Browse files Browse the repository at this point in the history
Also clarify systemd service usage and drop old.

Closes: https://bugs.gentoo.org/888183
Signed-off-by: Paolo Pedroni <[email protected]>
Closes: gentoo#28852
Signed-off-by: Joonas Niilola <[email protected]>
  • Loading branch information
PPed72 authored and juippis committed Jan 12, 2023
1 parent 3c265c1 commit 0fe44f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
Expand All @@ -16,7 +16,7 @@ if [[ ${PV} == 9999 ]]; then
EGIT_REPO_URI="https://git.deluge-torrent.org/${PN}"
else
SRC_URI="http://download.deluge-torrent.org/source/$(ver_cut 1-2)/${P}.tar.xz"
KEYWORDS="amd64 ~arm ~arm64 ~ppc ~riscv x86"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~riscv ~x86"
fi

LICENSE="GPL-2"
Expand Down Expand Up @@ -64,6 +64,8 @@ RDEPEND="
')
"

PATCHES=( "${FILESDIR}/${P}-twisted-22.10.patch" )

distutils_enable_tests pytest

python_prepare_all() {
Expand Down Expand Up @@ -131,7 +133,7 @@ python_install_all() {
if use webinterface; then
newinitd "${FILESDIR}/deluge-web.init-2" deluge-web
newconfd "${FILESDIR}/deluge-web.conf" deluge-web
systemd_newunit "${FILESDIR}/deluge-web.service-3" deluge-web.service
systemd_newunit "${FILESDIR}/deluge-web.service-4" deluge-web.service
systemd_install_serviced "${FILESDIR}/deluge-web.service.conf"
else
rm -r "${D}/$(python_get_sitedir)/deluge/ui/web/" || die
Expand All @@ -156,7 +158,9 @@ pkg_postinst() {
elog
elog "To start the daemon either run 'deluged' as user"
elog "or modify /etc/conf.d/deluged and run"
elog "/etc/init.d/deluged start as root"
elog "'/etc/init.d/deluged start' as root if you use OpenRC"
elog "or"
elog "'systemctl start deluged.service' as root if you use systemd"
elog "You can still use deluge the old way"
elog
elog "Systemd unit files for deluged and deluge-web no longer source"
Expand Down
10 changes: 10 additions & 0 deletions net-p2p/deluge/files/deluge-web.service-4
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Deluge WebUI
Documentation=man:deluge-web
After=deluged.service

[Service]
ExecStart=/usr/bin/deluge-web -d -c ${DELUGE_WEB_HOME} ${DELUGE_WEB_OPTS}

[Install]
WantedBy=multi-user.target

0 comments on commit 0fe44f7

Please sign in to comment.