net-p2p/deluge: 'files' folder cleanup

Bug: https://bugs.gentoo.org/636860
This commit is contained in:
PPed72
2017-11-08 12:45:35 +01:00
committed by Kristian Fiskerstrand
parent 4f871b6795
commit fc9581d755
4 changed files with 0 additions and 104 deletions

View File

@@ -1,11 +0,0 @@
[Unit]
Description=Deluge WebUI
After=deluged.service
[Service]
User=deluge
ExecStart=/usr/bin/deluge-web
[Install]
WantedBy=multi-user.target

View File

@@ -1,9 +0,0 @@
# /etc/conf.d/deluged
# Change this to the user you want to run deluged as.
# You may specify a group too, after a colon
DELUGED_USER=""
# DELUGED_UMASK="0002"
# DELUGED_OPTS="-p 58846"
DELUGEUI_START="false"
DELUGEUI_OPTS="-u web"

View File

@@ -1,71 +0,0 @@
#!/sbin/openrc-run
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later
depend() {
need net
}
checkconfig() {
if [ "${DELUGED_USER}" = "" ] ; then
eerror "Please edit /etc/conf.d/deluged"
eerror "You have to specify a user to run deluged as, as we will not run it as root!"
eerror "Modify DELUGED_USER to your needs (you can also add a group, after a colon)"
return 1
fi
if ! getent passwd "${DELUGED_USER%:*}" >/dev/null ; then
eerror "Please edit /etc/conf.d/deluged"
eerror "Your user has to exist!"
return 1
fi
if [ "${DELUGED_USER%:*}" = "${DELUGED_USER}" ] ; then
return 0
else
if ! getent group "${DELUGED_USER#*:}" >/dev/null ; then
eerror "Please edit /etc/conf.d/deluged"
eerror "Your group has to exist too!"
return 1
fi
fi
return 0
}
start() {
checkconfig || return $?
if [ "${DELUGED_HOME}" = "" ] ; then
DELUGED_USER_HOME=$(getent passwd "${DELUGED_USER%:*}" | cut -d ':' -f 6)
else
DELUGED_USER_HOME=${DELUGED_HOME}
fi
ebegin "Starting Deluged"
start-stop-daemon --start --user "${DELUGED_USER%:*}" \
--name deluged --pidfile /run/deluged.pid --background --make-pidfile \
${DELUGED_UMASK:+--umask ${DELUGED_UMASK}} \
--exec /usr/bin/deluged -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 \
/run/deluge.pid --make-pidfile \
--exec /usr/bin/deluge --user "${DELUGED_USER%:*}" \
-e HOME="${DELUGED_USER_HOME}" -- ${DELUGEUI_OPTS}
eend $?
fi
}
stop() {
ebegin "Stopping Deluged"
start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
--name deluged --pidfile /run/deluged.pid
eend $?
if [ "${DELUGEUI_START}" = "true" ] ; then
ebegin "Stopping Deluge"
start-stop-daemon --stop --user "${DELUGED_USER%:*}" \
--name deluge --pidfile /run/deluge.pid
eend $?
fi
}

View File

@@ -1,13 +0,0 @@
[Unit]
Description=Deluge BitTorrent client
After=network.target local-fs.target
Wants=local-fs.target
[Service]
EnvironmentFile=/etc/conf.d/deluged
User=deluge
Group=deluge
ExecStart=/usr/bin/deluged -d -p $DELUGED_PORT $DELUGED_OPTIONS
[Install]
WantedBy=multi-user.target