summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/scylla-bin/files')
-rw-r--r--dev-db/scylla-bin/files/10-scylla.conf2
-rw-r--r--dev-db/scylla-bin/files/scylla-jmx.confd9
-rw-r--r--dev-db/scylla-bin/files/scylla-jmx.initd23
-rw-r--r--dev-db/scylla-bin/files/scylla-server.confd17
-rw-r--r--dev-db/scylla-bin/files/scylla-server.initd37
-rw-r--r--dev-db/scylla-bin/files/scylla.sudoers1
6 files changed, 89 insertions, 0 deletions
diff --git a/dev-db/scylla-bin/files/10-scylla.conf b/dev-db/scylla-bin/files/10-scylla.conf
new file mode 100644
index 0000000..48cfe7c
--- /dev/null
+++ b/dev-db/scylla-bin/files/10-scylla.conf
@@ -0,0 +1,2 @@
+:syslogtag, startswith, "scylla" /var/log/scylla/scylla.log
+& ~
diff --git a/dev-db/scylla-bin/files/scylla-jmx.confd b/dev-db/scylla-bin/files/scylla-jmx.confd
new file mode 100644
index 0000000..8177e13
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-jmx.confd
@@ -0,0 +1,9 @@
+# please check the defaults of scylla in the /etc/default/scylla-jmx file!
+#
+# you can configure the following options for the OpenRC init script:
+# - run_dir
+
+# source scylla default env
+source /etc/default/scylla-jmx
+
+rc_need="scylla-server" \ No newline at end of file
diff --git a/dev-db/scylla-bin/files/scylla-jmx.initd b/dev-db/scylla-bin/files/scylla-jmx.initd
new file mode 100644
index 0000000..996c414
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-jmx.initd
@@ -0,0 +1,23 @@
+#!/sbin/openrc-run
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+run_dir=${run_dir:-/run/scylla-jmx}
+
+command="/opt/scylladb/jmx/scylla-jmx"
+command_args=""
+command_background="true"
+command_progress="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${USER:-scylla}
+group=${GROUP:-scylla}
+retry="SIGTERM/120"
+start_stop_daemon_args="--user ${user} --group ${group} --wait 2000 --make-pidfile"
+
+depend() {
+ use net localmount logger
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+}
diff --git a/dev-db/scylla-bin/files/scylla-server.confd b/dev-db/scylla-bin/files/scylla-server.confd
new file mode 100644
index 0000000..f210c1b
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-server.confd
@@ -0,0 +1,17 @@
+# please check the defaults of scylla in the /etc/default/scylla-server file!
+#
+# you can configure the following options for the OpenRC init script:
+# - chdir
+# - config_file
+# - run_dir
+
+# source scylla default env
+source /etc/default/scylla-server
+
+# source scylla additional configuration
+for i in /etc/scylla.d/*.conf; do
+ if [ "$i" = "/etc/scylla.d/*.conf" ]; then
+ break
+ fi
+ . "$i"
+done
diff --git a/dev-db/scylla-bin/files/scylla-server.initd b/dev-db/scylla-bin/files/scylla-server.initd
new file mode 100644
index 0000000..12aaf1b
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla-server.initd
@@ -0,0 +1,37 @@
+#!/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/scylla.yaml}
+run_dir=${run_dir:-/run/scylla}
+chdir=${chdir:-/var/lib/scylla/coredump}
+
+command="/usr/bin/scylla"
+command_args="--options-file ${config_file} ${CPUSET} ${DEV_MODE} ${SEASTAR_IO} ${SCYLLA_ARGS}"
+command_background="true"
+command_progress="true"
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${USER:-scylla}
+group=${GROUP:-scylla}
+retry="SIGTERM/120"
+start_stop_daemon_args="--chdir ${chdir} --user ${user} --group ${group} --wait 5000"
+
+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
+ export SCYLLA_CONF SCYLLA_HOME
+ ebegin "Running scylla_prepare"
+ /usr/lib/scylla/scylla_prepare >/dev/null
+}
+
+stop_post() {
+ ebegin "Running scylla_stop"
+ /usr/lib/scylla/scylla_stop >/dev/null
+}
diff --git a/dev-db/scylla-bin/files/scylla.sudoers b/dev-db/scylla-bin/files/scylla.sudoers
new file mode 100644
index 0000000..62270ed
--- /dev/null
+++ b/dev-db/scylla-bin/files/scylla.sudoers
@@ -0,0 +1 @@
+scylla ALL=(ALL) NOPASSWD: /usr/lib/scylla/scylla_prepare,/usr/lib/scylla/scylla_stop,/usr/lib/scylla/scylla_io_setup,/usr/lib/scylla/scylla-ami/scylla_ami_setup