summaryrefslogtreecommitdiff
path: root/dev-perl/Gearman-Server/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-perl/Gearman-Server/files
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-perl/Gearman-Server/files')
-rw-r--r--dev-perl/Gearman-Server/files/Gearman-Server-1.130.1-Use-saner-name-in-process-listing.patch33
-rw-r--r--dev-perl/Gearman-Server/files/gearmand-conf.d-1.093
-rw-r--r--dev-perl/Gearman-Server/files/gearmand-init.d-1.0925
3 files changed, 61 insertions, 0 deletions
diff --git a/dev-perl/Gearman-Server/files/Gearman-Server-1.130.1-Use-saner-name-in-process-listing.patch b/dev-perl/Gearman-Server/files/Gearman-Server-1.130.1-Use-saner-name-in-process-listing.patch
new file mode 100644
index 000000000000..c46ac0ecef59
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/Gearman-Server-1.130.1-Use-saner-name-in-process-listing.patch
@@ -0,0 +1,33 @@
+From acd6722c16e17ddbdf6c73c99c693b7674f0fea7 Mon Sep 17 00:00:00 2001
+From: "Robin H. Johnson" <robbat2@gentoo.org>
+Date: Sat, 12 May 2007 22:16:37 -0700
+Subject: Use saner name in process listing.
+
+Normally the binary will turn up in the process list as:
+/usr/bin/perl $SCRIPTNAME
+
+By adding a single line, we can make it be simply '$SCRIPTNAME'.
+This makes writing init.d scripts signficently easier.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+---
+ bin/gearmand | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/bin/gearmand b/bin/gearmand
+index 6046a99..68d1bcf 100755
+--- a/bin/gearmand
++++ b/bin/gearmand
+@@ -130,6 +130,9 @@ my ($daemonize, $nokeepalive, $notify_pid, $opt_pidfile, $accept, $wakeup,
+ $wakeup_delay, $conf_host,);
+ my $conf_port = 4730;
+
++# Rename binary in process list to make init scripts saner
++$0 = $_ = $0;
++
+ Getopt::Long::GetOptions(
+ 'd|daemonize' => \$daemonize,
+ 'p|port=i' => \$conf_port,
+--
+2.14.2
+
diff --git a/dev-perl/Gearman-Server/files/gearmand-conf.d-1.09 b/dev-perl/Gearman-Server/files/gearmand-conf.d-1.09
new file mode 100644
index 000000000000..590915d7cb98
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/gearmand-conf.d-1.09
@@ -0,0 +1,3 @@
+PIDFILE="/var/run/gearmand.pid"
+GEARMAND_OPTS="--daemonize --port=7003 --pidfile=${PIDFILE}"
+# vim: ft=gentoo-conf-d:
diff --git a/dev-perl/Gearman-Server/files/gearmand-init.d-1.09 b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
new file mode 100644
index 000000000000..88b635b8f870
--- /dev/null
+++ b/dev-perl/Gearman-Server/files/gearmand-init.d-1.09
@@ -0,0 +1,25 @@
+#!/sbin/openrc-run
+
+NAME="gearmand"
+BINARY="/usr/bin/gearmand"
+
+depend() {
+ use net
+}
+
+start() {
+ # start-stop-daemon does not work properly in certain cases
+ # this hack should go away when bug #178274 is resolved.
+ ebegin "Starting $NAME"
+ start-stop-daemon --start --pidfile="${PIDFILE}" \
+ --exec ${BINARY} -- ${GEARMAND_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping $NAME"
+ start-stop-daemon --stop --pidfile="${PIDFILE}"
+ eend $?
+}
+
+# vim: ft=gentoo-init-d: