From: "Alexys Jacob" <ultrabug@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] dev/ultrabug:master commit in: app-admin/consul/files/, app-admin/consul/
Date: Thu, 5 Jun 2014 09:16:19 +0000 (UTC) [thread overview]
Message-ID: <1401959774.16617f7692fc9715d98bfc4413b24201f8704f7e.ultrabug@gentoo> (raw)
commit: 16617f7692fc9715d98bfc4413b24201f8704f7e
Author: Ultrabug <ultrabug <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 5 09:16:14 2014 +0000
Commit: Alexys Jacob <ultrabug <AT> gentoo <DOT> org>
CommitDate: Thu Jun 5 09:16:14 2014 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=dev/ultrabug.git;a=commit;h=16617f76
consul respect user and group, change default datadir to consul home add more options to init script conf
---
app-admin/consul/Manifest | 4 ++--
app-admin/consul/files/consul-agent.confd | 11 ++++++++++-
app-admin/consul/files/consul-agent.initd | 15 ++++++++++-----
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/app-admin/consul/Manifest b/app-admin/consul/Manifest
index 1eba3a6..1493d92 100644
--- a/app-admin/consul/Manifest
+++ b/app-admin/consul/Manifest
@@ -1,4 +1,4 @@
-AUX consul-agent.confd 126 SHA256 f86878f356ba57b9d54f94ff93798b6751833127efa03214ad5afa68a17bb5f2 SHA512 a6ef9db3ed9a3a6cd1c50ada4e1c2c7cd6e7d3eff44bacc21e3e11d83a764df1d311998d54951afb8a96854a4f80ff8920e21133cb8bbd55cf96f7285fb3bad3 WHIRLPOOL e2e7a64bb3dc983919ac42c5bb221272a666145322ebf6ee2f91b72d8101ea9f90170d41826a683e3d318df0581e89d272e0d51793d845c67094fa274da67fe2
-AUX consul-agent.initd 1069 SHA256 0ea3aa9c8d8763ce1c700d5e907377f47325f7811f0c71ba4b4d8a8064537488 SHA512 6f1efafc27d43b769d81e7a6a84248ba7bda2749a647115b0eb82d823366bd48472df6e470baad3469937b93de2406e145d4c806fd36b5f102457c531f891800 WHIRLPOOL ec9268c88399bbd2e8e0ab0a4960c678bb9757ced99b119b8ee0b4626b7374e262d8ddef63c7c6078b88d5320e2518168a66a148bf8887dc61868467ce23d9fb
+AUX consul-agent.confd 382 SHA256 f1c9bc500314f507f34362bea2b2e55258414b779c14e4f3ddc169aa78f875c2 SHA512 1068517b4c64d9d12072e04c8b50ab0c9a57d0780c50a9e501d51af99d3fffd86cdcab6c913e23b1de187bc698ef0a79b6ac58cd2f28a425d74596a606f3dc62 WHIRLPOOL 08029897a59e6d74670e78f80d299a1c7a4b118e583067cd26a4bf385e40a4e5772a139f40c5e7fefea94f46408b3eeb36d906352c3ff9c9f7a2cc200414c174
+AUX consul-agent.initd 1269 SHA256 2799e56571fc6359d291592d1350e0754dc792f138746aa246f3cd25132039ca SHA512 746d233ddd68f5343c526356a00d4af032917832d33b2695639cdce7f7e829335ddc2f1ecdf2bba0c76f5ceb14ca6a3f542e2e7ff450f504e775667082ae1286 WHIRLPOOL 55050e26d28034bf7473260dee0ee2d4a4313ec97aceb0de07e5b872103beca99f7e211a2ea8160cdd2f114d4c67b8845823cdc979c66525d5cd4c12129ec369
EBUILD consul-0.2.1.ebuild 1548 SHA256 06ec50067b4fadae97631feb215ead3a872632c793bc033f3824106070a04158 SHA512 36993369e6052c7e074c941d47fac51c3845c244be1aca7413f8037d75127d51c88d296323c0f78b675cb28badddc4dbad1092cb60a91ea7408873f466ceddd3 WHIRLPOOL 1abddcbc6fb7f3d71140646a926fcae0045a0097debee49221046882389bb89a7152dc94590115e9522e097e313a5a8a6d24cffcd9e0c0dc4b414f30054977ca
EBUILD consul-9999.ebuild 1421 SHA256 eb68665ccbd97261edf476cb1cb2f6cdbcc78a118fbc950f355364751e0b5f6c SHA512 2d6130bfce73960e2763d1c92849bcfe9443561e4e4fe006137cea6a62262378a2dbd80227a1881f91a45daf73d0fdd0ff2d1b5efa81b84e5c2174008e33d592 WHIRLPOOL caac446ec3805ca5870c10a09abe63afddaba7b75df7e30da9b05ff50f7469e2397fa7d34be1dbda27f1de10dc58db0f9520a2ad9e1c99231e7321dd3fb3d6d0
diff --git a/app-admin/consul/files/consul-agent.confd b/app-admin/consul/files/consul-agent.confd
index 75df601..03243c2 100644
--- a/app-admin/consul/files/consul-agent.confd
+++ b/app-admin/consul/files/consul-agent.confd
@@ -1,2 +1,11 @@
+# you can change the init script behavior by setting those parameters
+# - data_dir (default: /var/lib/consul/${SVCNAME})
+# - group (default: consul)
+# - pidfile (default: /run/consul/${SVCNAME}.pid)
+# - user (default: consul)
+
# extra arguments for the consul agent
-command_args="-server -bootstrap -data-dir=/tmp/consul-agent -config-dir=/etc/consul.d"
\ No newline at end of file
+command_args="-server -config-dir=/etc/consul.d -bootstrap"
+
+# upstream strongly recommends > 1
+export GOMAXPROCS=10
\ No newline at end of file
diff --git a/app-admin/consul/files/consul-agent.initd b/app-admin/consul/files/consul-agent.initd
index 07c750d..19ad385 100644
--- a/app-admin/consul/files/consul-agent.initd
+++ b/app-admin/consul/files/consul-agent.initd
@@ -3,14 +3,15 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: $
-export GOMAXPROCS=10
-
-pidfile=${pidfile:-"/run/${SVCNAME}.pid"}
+data_dir=${data_dir:-"/var/lib/consul/${SVCNAME}"}
+group=${group:-consul}
+pidfile=${pidfile:-"/run/consul/${SVCNAME}.pid"}
+user=${user:-consul}
command="/usr/bin/consul"
-command_args="agent ${command_args} -pid-file ${pidfile}"
+command_args="agent -data-dir=${data_dir} ${command_args}"
command_background="true"
-start_stop_daemon_args="--stdout /var/log/consul/${SVCNAME}.log --stderr /var/log/consul/${SVCNAME}.telemetry.log"
+start_stop_daemon_args="--user ${user} --group ${group} --stdout /var/log/consul/${SVCNAME}.log --stderr /var/log/consul/${SVCNAME}.telemetry.log"
description="tool for service discovery, monitoring and configuration."
extra_started_commands="reload telemetry"
@@ -26,6 +27,10 @@ reload() {
eend $?
}
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" $(dirname "${pidfile}")
+}
+
stop() {
# We need to override the default stop function
# because it uses SIGTERM whereas consul needs a SIGINT
next reply other threads:[~2014-06-05 9:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 9:16 Alexys Jacob [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-06-04 14:25 [gentoo-commits] dev/ultrabug:master commit in: app-admin/consul/files/, app-admin/consul/ Alexys Jacob
2014-06-04 9:29 Alexys Jacob
2014-06-03 17:05 Alexys Jacob
2014-06-03 14:05 Alexys Jacob
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401959774.16617f7692fc9715d98bfc4413b24201f8704f7e.ultrabug@gentoo \
--to=ultrabug@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox