1 |
commit: 98ede44b632ad8b147993a6d8bed2c3b91633ce2 |
2 |
Author: David Denoncin <ddenoncin <AT> gmail <DOT> com> |
3 |
AuthorDate: Mon Oct 26 12:56:35 2020 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Nov 1 06:13:55 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=98ede44b |
7 |
|
8 |
www-apps/bugzilla: update init script |
9 |
|
10 |
Applied patch from Brian Evans "to use openrc-run more portable and |
11 |
modern format so that different supervisors can be used as the user |
12 |
desires for bugzilla-queue". |
13 |
|
14 |
Closes: https://bugs.gentoo.org/749924 |
15 |
|
16 |
Package-Manager: Portage-3.0.4, Repoman-2.3.23 |
17 |
Signed-off-by: David Denoncin <ddenoncin <AT> gmail.com> |
18 |
Closes: https://github.com/gentoo/gentoo/pull/18040 |
19 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
20 |
|
21 |
...zilla-5.0.6.ebuild => bugzilla-5.0.6-r1.ebuild} | 0 |
22 |
www-apps/bugzilla/files/bugzilla-queue.initd | 27 +++++++++++----------- |
23 |
2 files changed, 13 insertions(+), 14 deletions(-) |
24 |
|
25 |
diff --git a/www-apps/bugzilla/bugzilla-5.0.6.ebuild b/www-apps/bugzilla/bugzilla-5.0.6-r1.ebuild |
26 |
similarity index 100% |
27 |
rename from www-apps/bugzilla/bugzilla-5.0.6.ebuild |
28 |
rename to www-apps/bugzilla/bugzilla-5.0.6-r1.ebuild |
29 |
|
30 |
diff --git a/www-apps/bugzilla/files/bugzilla-queue.initd b/www-apps/bugzilla/files/bugzilla-queue.initd |
31 |
index 800793862f1..3c73041365d 100644 |
32 |
--- a/www-apps/bugzilla/files/bugzilla-queue.initd |
33 |
+++ b/www-apps/bugzilla/files/bugzilla-queue.initd |
34 |
@@ -1,10 +1,17 @@ |
35 |
#!/sbin/openrc-run |
36 |
-# Copyright 1999-2011 Gentoo Foundation |
37 |
+# Copyright 1999-2020 Gentoo Authors |
38 |
# Distributed under the terms of the GNU General Public License v2 |
39 |
|
40 |
-PIDFILE="/var/run/bugzilla/${SVCNAME}.pid" |
41 |
+command=${JOBQUEUE_PATH} |
42 |
JOBQUEUE_USER=${JOBQUEUE_USER:-root} |
43 |
JOBQUEUE_GROUP=${JOBQUEUE_GROUP:-root} |
44 |
+command_user="${JOBQUEUE_USER}:${JOBQUEUE_GROUP}" |
45 |
+pidfile="/var/run/bugzilla/${RC_SVCNAME}.pid" |
46 |
+command_args="-p ${pidfile} -n ${RC_SVCNAME} start" |
47 |
+if [ "${supervisor}" = "supervise-daemon" ]; then |
48 |
+ command_args="-f ${command_args}" |
49 |
+ pidfile="/var/run/bugzilla/${RC_SVCNAME}.supervise.pid" |
50 |
+fi |
51 |
|
52 |
checkconfig() { |
53 |
[[ -z "${JOBQUEUE_USER}" || -z "$(getent passwd ${JOBQUEUE_USER})" ]] && { eerror "JOBQUEUE_USER not set or doesn't exist"; return 1; } |
54 |
@@ -13,26 +20,18 @@ checkconfig() { |
55 |
return 0 |
56 |
} |
57 |
|
58 |
-start() { |
59 |
- ebegin "Starting ${SVCNAME}" |
60 |
+start_pre() { |
61 |
checkconfig || return 1 |
62 |
|
63 |
- piddir="${PIDFILE%/*}" |
64 |
+ piddir="${pidfile%/*}" |
65 |
if [ ! -d "${piddir}" ]; then |
66 |
- checkpath -q -d -o $JOBQUEUE_USER:$JOBQUEUE_GROUP -m 0770 "${piddir}" || { |
67 |
+ checkpath -q -d -o "${command_user}" -m 0770 "${piddir}" || { |
68 |
eend 1 |
69 |
return 1 |
70 |
} |
71 |
fi |
72 |
- |
73 |
- start-stop-daemon --start --pidfile $PIDFILE --user $JOBQUEUE_USER --group $JOBQUEUE_GROUP \ |
74 |
- --exec $JOBQUEUE_PATH -- -p $PIDFILE -n $SVCNAME start 1>/dev/null |
75 |
- eend $? |
76 |
} |
77 |
|
78 |
-stop() { |
79 |
- ebegin "Stopping ${SVCNAME}" |
80 |
+stop_pre() { |
81 |
checkconfig || return 1 |
82 |
- start-stop-daemon --pidfile $PIDFILE --stop --exec $JOBQUEUE_PATH -- -p $PIDFILE -n $SVCNAME stop |
83 |
- eend $? |
84 |
} |