summaryrefslogtreecommitdiff
path: root/app-admin/consul-template/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-admin/consul-template/files
reinit the tree, so we can have metadata
Diffstat (limited to 'app-admin/consul-template/files')
-rw-r--r--app-admin/consul-template/files/consul-template.confd7
-rw-r--r--app-admin/consul-template/files/consul-template.initd20
-rw-r--r--app-admin/consul-template/files/consul-template.logrotated7
-rw-r--r--app-admin/consul-template/files/consul-template.service16
4 files changed, 50 insertions, 0 deletions
diff --git a/app-admin/consul-template/files/consul-template.confd b/app-admin/consul-template/files/consul-template.confd
new file mode 100644
index 000000000000..9af7d023305e
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.confd
@@ -0,0 +1,7 @@
+# you can change the init script behavior by setting those parameters
+# - group (default: consul-template)
+# - pidfile (default: /run/consul-template/consul-template.pid)
+# - user (default: consul-template)
+
+# extra arguments for the consul agent
+command_args="-config=/etc/consul-template.d"
diff --git a/app-admin/consul-template/files/consul-template.initd b/app-admin/consul-template/files/consul-template.initd
new file mode 100644
index 000000000000..f968d8d08612
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.initd
@@ -0,0 +1,20 @@
+#!/sbin/openrc-run
+# Copyright 2015-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="consul-template agent"
+user=${user:-${RC_SVCNAME}}
+group=${group:-${RC_SVCNAME}}
+pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
+
+command="/usr/bin/${RC_SVCNAME}"
+command_args="-config=/etc/consul-template.d ${command_args}"
+command_background="true"
+start_stop_daemon_args="--user ${user} --group ${group} \
+ --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
+ --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
+stopsig="SIGINT"
+
+depend() {
+ need net
+}
diff --git a/app-admin/consul-template/files/consul-template.logrotated b/app-admin/consul-template/files/consul-template.logrotated
new file mode 100644
index 000000000000..51e2737fd491
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.logrotated
@@ -0,0 +1,7 @@
+/var/log/consul-template/consul-template.log {
+ missingok
+ size 5M
+ rotate 3
+ compress
+ copytruncate
+}
diff --git a/app-admin/consul-template/files/consul-template.service b/app-admin/consul-template/files/consul-template.service
new file mode 100644
index 000000000000..69b1c86ddb46
--- /dev/null
+++ b/app-admin/consul-template/files/consul-template.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=consul-template daemon
+Requires=network-online.target
+After=network-online.target
+
+[Service]
+User=consul-template
+Environment=CONSUL_TEMPLATE_DAEMON_OPTS="-config=/etc/consul-template.d"
+ExecStart=/usr/bin/consul-template $CONSUL_TEMPLATE_DAEMON_OPTS
+Restart=on-failure
+SuccessExitStatus=12
+KillSignal=SIGINT
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=default.target