summaryrefslogtreecommitdiff
path: root/dev-db/etcd/files/etcd.initd
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-db/etcd/files/etcd.initd
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/etcd/files/etcd.initd')
-rw-r--r--dev-db/etcd/files/etcd.initd35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-db/etcd/files/etcd.initd b/dev-db/etcd/files/etcd.initd
new file mode 100644
index 000000000000..c9caecf7ff69
--- /dev/null
+++ b/dev-db/etcd/files/etcd.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+pidfile=/run/${RC_SVCNAME}.pid
+LOGPATH=/var/log/${RC_SVCNAME}
+DATADIR=/var/lib/${RC_SVCNAME}
+command_user=${RC_SVCNAME}
+command=/usr/bin/etcd
+command_args="
+ -name=${ETCD_NAME}
+ -data-dir=${ETCD_DATA_DIR}
+ ${ETCD_OPTS}"
+command_background=true
+start_stop_daemon_args="
+ --chdir ${ETCD_DATA_DIR}
+ -1 ${LOGPATH}/${RC_SVCNAME}.log
+ -2 ${LOGPATH}/${RC_SVCNAME}.err"
+
+depend() {
+ need net
+ need localmount
+ after bootmisc
+}
+
+start_pre() {
+ if [ ! -d "${LOGPATH}" ] ; then
+ mkdir -p "${LOGPATH}"
+ chown "${command_user}:${command_user}" "${LOGPATH}"
+ fi
+ if [ ! -d "${ETCD_DATA_DIR}" ] ; then
+ mkdir -p "${ETCD_DATA_DIR}"
+ chown "${command_user}:${command_user}" "${ETCD_DATA_DIR}"
+ fi
+}