aboutsummaryrefslogtreecommitdiffstats
path: root/testing/vault/vault.initd
diff options
context:
space:
mode:
authorChristian Kampka <christian@kampka.net>2015-09-19 12:37:45 +0200
committerFrancesco Colista <fcolista@alpinelinux.org>2015-09-21 08:54:21 +0000
commit5061eaa7164287ab2bf209ff9b3b3197551b0f6d (patch)
treebf651caec3773d758fcd9ce3da10ace1a3321fb5 /testing/vault/vault.initd
parent2b2d458b50da34ebb2659bbdcaecac89f7945dd6 (diff)
downloadaports-5061eaa7164287ab2bf209ff9b3b3197551b0f6d.tar.gz
aports-5061eaa7164287ab2bf209ff9b3b3197551b0f6d.tar.bz2
aports-5061eaa7164287ab2bf209ff9b3b3197551b0f6d.tar.xz
testing/vault: new aport
https://www.vaultproject.io Vault is a tool for securely accessing secrets. A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, and more. Vault provides a unified interface to any secret, while providing tight access control and recording a detailed audit log.
Diffstat (limited to 'testing/vault/vault.initd')
-rw-r--r--testing/vault/vault.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/testing/vault/vault.initd b/testing/vault/vault.initd
new file mode 100644
index 0000000000..f539db7032
--- /dev/null
+++ b/testing/vault/vault.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+
+name=vault
+daemon=/usr/sbin/$name
+daemon_user=$name
+daemon_group=$name
+pidfile="/run/${name}.pid"
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+
+ checkpath -f -m 0644 -o "${daemon_user}":"${daemon_group}" "$pidfile"
+
+ ebegin "Starting ${name}"
+ start-stop-daemon --start --quiet \
+ -m --pidfile "$pidfile" \
+ --user ${daemon_user} --group ${daemon_group} \
+ -b -1 /dev/null -2 /dev/null \
+ -k 027 --exec ${daemon} -- ${vault_opts}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${name}"
+ start-stop-daemon --stop --quiet \
+ --pidfile "$pidfile" \
+ --exec ${daemon}
+ eend $?
+}