summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2020-08-06 13:50:43 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-08-06 15:49:46 +0200
commit2d8e069aa56743472f8bb6191c7bc86d58ae1630 (patch)
treec48f6093f6ecd741ae32be0784a556d6deb33c1a /net-nntp/sabnzbd/files/sabnzbd.initd
parentdev-python/sabyenc: bump to v4.0.2 (diff)
downloadgentoo-2d8e069aa56743472f8bb6191c7bc86d58ae1630.tar.gz
gentoo-2d8e069aa56743472f8bb6191c7bc86d58ae1630.tar.bz2
gentoo-2d8e069aa56743472f8bb6191c7bc86d58ae1630.zip
net-nntp/sabnzbd: drop old
Closes: https://bugs.gentoo.org/708958 Package-Manager: Portage-3.0.1, Repoman-2.3.23 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'net-nntp/sabnzbd/files/sabnzbd.initd')
-rw-r--r--net-nntp/sabnzbd/files/sabnzbd.initd71
1 files changed, 0 insertions, 71 deletions
diff --git a/net-nntp/sabnzbd/files/sabnzbd.initd b/net-nntp/sabnzbd/files/sabnzbd.initd
deleted file mode 100644
index b3dca9797562..000000000000
--- a/net-nntp/sabnzbd/files/sabnzbd.initd
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-PIDFILE="/run/sabnzbd/sabnzbd.pid"
-
-depend() {
- need net
-}
-
-get_var() {
- grep -P -o -m 1 "(?<=^${1} = ).*" "${SABNZBD_CONFIGFILE}" || echo 0
-}
-
-start() {
- ebegin "Starting SABnzbd"
-
- checkpath -q -d -o ${SABNZBD_USER}:${SABNZBD_GROUP} -m 0770 "$(dirname "${PIDFILE}")"
-
- start-stop-daemon \
- --quiet \
- --start \
- --user ${SABNZBD_USER} \
- --group ${SABNZBD_GROUP} \
- --pidfile "${PIDFILE}" \
- --wait 1000 \
- --exec /usr/share/sabnzbd/SABnzbd.py \
- -- \
- --config-file "${SABNZBD_CONFIGFILE}" \
- --logging "${SABNZBD_LOGGING}" \
- --daemon \
- --pidfile "${PIDFILE}"
-
- eend $?
-}
-
-stop() {
- local protocol="http"
- local host="$(get_var "host")"
- local port="$(get_var "port")"
-
- if [ $(get_var "enable_https") -eq 1 ]; then
- protocol="https"
- port="$(get_var "https_port")"
- fi
-
- case "${host}" in
- *:*) host="[${host}]" ;;
- esac
-
- local url="${protocol}://${host}:${port}/sabnzbd/api?mode=shutdown"
-
- if [ $(get_var "disable_api_key") -eq 0 ]; then
- url="${url}&apikey=$(get_var "api_key")"
- fi
-
- local signals="TERM/1/KILL/1"
-
- ebegin "Stopping SABnzbd"
-
- if [ "$(wget -o /dev/null -t 1 -O - -T 10 "${url}")" = "ok" ]; then
- signals="NULL/5/${signals}"
- fi
-
- start-stop-daemon \
- --stop \
- --pidfile "${PIDFILE}" \
- --retry "${signals}"
-
- eend $?
-}