aboutsummaryrefslogtreecommitdiffstats
path: root/testing/etcd/etcd.initd
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-08-19 12:29:08 -0300
committerFrancesco Colista <fcolista@alpinelinux.org>2019-08-19 15:51:23 +0000
commitf7a74f652d05e535489b5c6f496cb9250cfae83c (patch)
treeb1485b96ba1ae12cd675d535ec5a98c67f083ac6 /testing/etcd/etcd.initd
parent4b0e3d45e77fec436eadb5d5aee6a1aaf23875b8 (diff)
downloadaports-f7a74f652d05e535489b5c6f496cb9250cfae83c.tar.bz2
aports-f7a74f652d05e535489b5c6f496cb9250cfae83c.tar.xz
testing/etcd: upgrade to 3.3.14
Diffstat (limited to 'testing/etcd/etcd.initd')
-rw-r--r--testing/etcd/etcd.initd38
1 files changed, 13 insertions, 25 deletions
diff --git a/testing/etcd/etcd.initd b/testing/etcd/etcd.initd
index 14c687967c..779ab2990e 100644
--- a/testing/etcd/etcd.initd
+++ b/testing/etcd/etcd.initd
@@ -2,35 +2,23 @@
# Copyright 2016 Alpine Linux
# Distributed under the terms of the GNU General Public License v2
# $Id$
+supervisor=supervise-daemon
+
+name="$RC_SVCNAME"
+description="Highly-available key-value store"
+
+command=/usr/bin/etcd
+command_args="--config-file=$ETCD_CONFIG --data-dir=$ETCD_DATA_DIR $ETCD_OPTS"
+
+command_user="$USER:$USER"
+
+supervise_daemon_args="--chdir $ETCD_DATA_DIR"
depend() {
need net
}
start_pre() {
- checkpath -d -m 0775 -o $USER:$USER $PIDPATH
- checkpath -d -m 0775 -o $USER:$USER $LOGPATH
- checkpath -d -m 0775 -o $USER:$USER $ETCD_DATA_DIR
-}
-
-start() {
- ebegin "Starting $SVCNAME"
- start-stop-daemon --start \
- --pidfile "$PIDFILE" \
- --user $USER \
- --chdir "$ETCD_DATA_DIR" \
- --background \
- --make-pidfile \
- --exec /usr/bin/etcd -- \
- --config-file=$ETCD_CONFIG \
- --data-dir="$ETCD_DATA_DIR" \
- $ETCD_OPTS
- eend $? "Failed to start $SVCNAME"
-}
-
-stop() {
- ebegin "Stopping $SVCNAME"
- start-stop-daemon --stop --pidfile $PIDFILE
- eend $? "Failed to stop $SVCNAME"
- rm -f "$PIDFILE"
+ checkpath -d -m 0775 -o "$command_user" "$LOGPATH"
+ checkpath -d -m 0775 -o "$command_user" "$ETCD_DATA_DIR"
}