summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUltrabug <ultrabug@gentoo.org>2020-02-18 18:35:35 +0100
committerUltrabug <ultrabug@gentoo.org>2020-02-18 18:35:35 +0100
commit4e3660b5bcc525d4f7253eea4ea64a9a3eb6ae3b (patch)
tree26877c6b0f98fcf6ee0cad876f0b2439a6fb604b /app-admin/scylla-manager-agent/files/scylla-manager-agent.initd
parentdev-db/scylla: still needs to patch yaml.load (diff)
downloadultrabug-4e3660b5bcc525d4f7253eea4ea64a9a3eb6ae3b.tar.gz
ultrabug-4e3660b5bcc525d4f7253eea4ea64a9a3eb6ae3b.tar.bz2
ultrabug-4e3660b5bcc525d4f7253eea4ea64a9a3eb6ae3b.zip
app-admin/scylla-manager-agent: new ebuild
Package-Manager: Portage-2.3.81, Repoman-2.3.20 Manifest-Sign-Key: 34FCB257983BA23A8CEC5EB7EB9E6405C24BFAE5 Signed-off-by: Alexys Jacob <ultrabug@gentoo.org>
Diffstat (limited to 'app-admin/scylla-manager-agent/files/scylla-manager-agent.initd')
-rw-r--r--app-admin/scylla-manager-agent/files/scylla-manager-agent.initd28
1 files changed, 28 insertions, 0 deletions
diff --git a/app-admin/scylla-manager-agent/files/scylla-manager-agent.initd b/app-admin/scylla-manager-agent/files/scylla-manager-agent.initd
new file mode 100644
index 0000000..e7bcca0
--- /dev/null
+++ b/app-admin/scylla-manager-agent/files/scylla-manager-agent.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+config_file=${config_file:-/etc/scylla-manager-agent/scylla-manager-agent.yaml}
+run_dir=${run_dir:-/run/scylla-manager-agent}
+
+command="/usr/bin/scylla-manager-agent"
+command_args=""
+command_background="true"
+command_progress="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${USER:-scylla-manager}
+group=${GROUP:-scylla-manager}
+retry="SIGTERM/120"
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ use net localmount logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ if [ ! -f ${config_file} ]; then
+ eerror "Missing configuration file ${config_file}"
+ return 1
+ fi
+}