summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Denoncin <ddenoncin@gmail.com>2020-10-26 13:56:35 +0100
committerJoonas Niilola <juippis@gentoo.org>2020-11-01 08:13:55 +0200
commit98ede44b632ad8b147993a6d8bed2c3b91633ce2 (patch)
treefccb66580185850ca35c5f9d39540d5c4a5b8ad5 /www-apps
parentwww-apps/bugzilla: optional dep for SSL support (diff)
downloadgentoo-98ede44b632ad8b147993a6d8bed2c3b91633ce2.tar.gz
gentoo-98ede44b632ad8b147993a6d8bed2c3b91633ce2.tar.bz2
gentoo-98ede44b632ad8b147993a6d8bed2c3b91633ce2.zip
www-apps/bugzilla: update init script
Applied patch from Brian Evans "to use openrc-run more portable and modern format so that different supervisors can be used as the user desires for bugzilla-queue". Closes: https://bugs.gentoo.org/749924 Package-Manager: Portage-3.0.4, Repoman-2.3.23 Signed-off-by: David Denoncin <ddenoncin@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/18040 Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/bugzilla/bugzilla-5.0.6-r1.ebuild (renamed from www-apps/bugzilla/bugzilla-5.0.6.ebuild)0
-rw-r--r--www-apps/bugzilla/files/bugzilla-queue.initd27
2 files changed, 13 insertions, 14 deletions
diff --git a/www-apps/bugzilla/bugzilla-5.0.6.ebuild b/www-apps/bugzilla/bugzilla-5.0.6-r1.ebuild
index 76a3fa9ba508..76a3fa9ba508 100644
--- a/www-apps/bugzilla/bugzilla-5.0.6.ebuild
+++ b/www-apps/bugzilla/bugzilla-5.0.6-r1.ebuild
diff --git a/www-apps/bugzilla/files/bugzilla-queue.initd b/www-apps/bugzilla/files/bugzilla-queue.initd
index 800793862f13..3c73041365d3 100644
--- a/www-apps/bugzilla/files/bugzilla-queue.initd
+++ b/www-apps/bugzilla/files/bugzilla-queue.initd
@@ -1,10 +1,17 @@
#!/sbin/openrc-run
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-PIDFILE="/var/run/bugzilla/${SVCNAME}.pid"
+command=${JOBQUEUE_PATH}
JOBQUEUE_USER=${JOBQUEUE_USER:-root}
JOBQUEUE_GROUP=${JOBQUEUE_GROUP:-root}
+command_user="${JOBQUEUE_USER}:${JOBQUEUE_GROUP}"
+pidfile="/var/run/bugzilla/${RC_SVCNAME}.pid"
+command_args="-p ${pidfile} -n ${RC_SVCNAME} start"
+if [ "${supervisor}" = "supervise-daemon" ]; then
+ command_args="-f ${command_args}"
+ pidfile="/var/run/bugzilla/${RC_SVCNAME}.supervise.pid"
+fi
checkconfig() {
[[ -z "${JOBQUEUE_USER}" || -z "$(getent passwd ${JOBQUEUE_USER})" ]] && { eerror "JOBQUEUE_USER not set or doesn't exist"; return 1; }
@@ -13,26 +20,18 @@ checkconfig() {
return 0
}
-start() {
- ebegin "Starting ${SVCNAME}"
+start_pre() {
checkconfig || return 1
- piddir="${PIDFILE%/*}"
+ piddir="${pidfile%/*}"
if [ ! -d "${piddir}" ]; then
- checkpath -q -d -o $JOBQUEUE_USER:$JOBQUEUE_GROUP -m 0770 "${piddir}" || {
+ checkpath -q -d -o "${command_user}" -m 0770 "${piddir}" || {
eend 1
return 1
}
fi
-
- start-stop-daemon --start --pidfile $PIDFILE --user $JOBQUEUE_USER --group $JOBQUEUE_GROUP \
- --exec $JOBQUEUE_PATH -- -p $PIDFILE -n $SVCNAME start 1>/dev/null
- eend $?
}
-stop() {
- ebegin "Stopping ${SVCNAME}"
+stop_pre() {
checkconfig || return 1
- start-stop-daemon --pidfile $PIDFILE --stop --exec $JOBQUEUE_PATH -- -p $PIDFILE -n $SVCNAME stop
- eend $?
}