summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-cluster/gearmand/files
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-cluster/gearmand/files')
-rw-r--r--sys-cluster/gearmand/files/gearmand.conf.d39
-rw-r--r--sys-cluster/gearmand/files/gearmand.init.d.278
2 files changed, 117 insertions, 0 deletions
diff --git a/sys-cluster/gearmand/files/gearmand.conf.d b/sys-cluster/gearmand/files/gearmand.conf.d
new file mode 100644
index 000000000000..aeb49d5c6b9e
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.conf.d
@@ -0,0 +1,39 @@
+# /etc/conf.d/gearmand: config file for /etc/init.d/gearmand
+
+# Persistent queue store
+# The following queue stores are available:
+# drizzle|memcache|mysql|postgre|sqlite|tokyocabinet|none
+# If you do not wish to use persistent queues, leave this option commented out.
+# Note that persistent queue mechanisms are mutally exclusive.
+#PERSISTENT=""
+
+# Persistent queue settings for drizzle, mysql and postgre
+#PERSISTENT_SOCKET=""
+#PERSISTENT_HOST=""
+#PERSISTENT_PORT=""
+#PERSISTENT_USER=""
+#PERSISTENT_PASS=""
+#PERSISTENT_DB=""
+#PERSISTENT_TABLE=""
+
+# Persistent queue settings for sqlite
+#PERSISTENT_FILE=""
+
+# Persistent queue settings for memcache
+#PERSISTENT_SERVERLIST=""
+
+# General settings
+#
+# -j, --job-retries=RETRIES Number of attempts to run the job before the job
+# server removes it. Thisis helpful to ensure a bad
+# job does not crash all available workers. Default
+# is no limit.
+# -L, --listen=ADDRESS Address the server should listen on. Default is
+# INADDR_ANY.
+# -p, --port=PORT Port the server should listen on. Default=4730.
+# -r, --protocol=PROTOCOL Load protocol module.
+# -t, --threads=THREADS Number of I/O threads to use. Default=0.
+# -v, --verbose Increase verbosity level by one.
+# -w, --worker-wakeup=WORKERS Number of workers to wakeup for each job received.
+# The default is to wakeup all available workers.
+GEARMAND_PARAMS=""
diff --git a/sys-cluster/gearmand/files/gearmand.init.d.2 b/sys-cluster/gearmand/files/gearmand.init.d.2
new file mode 100644
index 000000000000..bf7d681c90e8
--- /dev/null
+++ b/sys-cluster/gearmand/files/gearmand.init.d.2
@@ -0,0 +1,78 @@
+#!/sbin/runscript
+# Copyright 2009-2012 Pavel Stratil, senbonzakura.eu
+# Distributed under the terms of the MIT license
+
+pidfile=/var/run/gearmand/gearmand.pid
+command=/usr/sbin/gearmand
+
+depend() {
+ use localmount
+
+ case $PERSISTENT in
+ drizzle)
+ use drizzle
+ ;;
+ memcache)
+ use memcache
+ ;;
+ mysql)
+ use mysql
+ ;;
+ postgre)
+ use postgresql
+ ;;
+ *)
+ ;;
+ esac
+}
+
+start() {
+ case ${PERSISTENT:-none} in
+ drizzle|mysql)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libdrizzle"
+ [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-host=${PERSISTENT_HOST}"
+ [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-user=${PERSISTENT_USER}"
+ [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-password=${PERSISTENT_PASS}"
+ [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-db=${PERSISTENT_DB}"
+ [ ${PERSISTENT_TABLE} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-table=${PERSISTENT_TABLE}"
+ [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-port=${PERSISTENT_PORT}"
+ [ ${PERSISTENT_SOCKET} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-uds=${PERSISTENT_SOCKET}"
+ [ ${PERSISTENT} == "mysql" ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libdrizzle-mysql"
+ ;;
+ memcache)
+ [ ${PERSISTENT_SERVERLIST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libmemcached --libmemcached-servers=${PERSISTENT_SERVERLIST}"
+ ;;
+ postgre)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libpq"
+ [ ${PERSISTENT_HOST} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-host=${PERSISTENT_HOST}"
+ [ ${PERSISTENT_USER} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-user=${PERSISTENT_USER}"
+ [ ${PERSISTENT_PASS} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-password=${PERSISTENT_PASS}"
+ [ ${PERSISTENT_DB} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-dbname=${PERSISTENT_DB}"
+ [ ${PERSISTENT_PORT} ] && GEARMAND_PARAMS="${GEARMAND_PARAMS} --libpq-port=${PERSISTENT_PORT}"
+ [ ${PERSISTENT_TABLE} ] && ewarn "Libpq doesn't recognise 'table' parameter."
+ [ ${PERSISTENT_SOCKET} ] && ewarn "Libpq doesn't recognise 'socket' parameter. If no host is set, it automatically falls back to a socket."
+ ;;
+ tokyocabinet)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libtokyocabinet --libtokyocabinet-file=${PERSISTENT_FILE}"
+ ;;
+ sqlite)
+ GEARMAND_PARAMS="${GEARMAND_PARAMS} -q libsqlite3 --libsqlite3-db=${PERSISTENT_FILE}"
+ ;;
+ none)
+ ;;
+ *)
+ eerror "Wrong persistent queue store setting in /etc/conf.d/gearmand."
+ return 1
+ ;;
+ esac
+
+
+ checkpath -d -m 0755 -o gearmand:nogroup /var/run/gearmand /var/log/gearmand
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --pidfile /var/run/gearmand/gearmand.pid --start \
+ --exec /usr/sbin/gearmand -- --pid-file=/var/run/gearmand/gearmand.pid \
+ --user=gearmand --daemon \
+ --log-file=/var/log/gearmand/gearmand.log ${GEARMAND_PARAMS}
+ eend $?
+}