aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandino Araico Sanchez <sandino@sandino.net>2018-12-06 19:42:46 -0600
committerAnthony G. Basile <blueness@gentoo.org>2018-12-07 06:34:01 -0500
commit2de5f67f60070e9c89bd24abad6d6c1f1d3773bb (patch)
tree1160e99e21621ea958a3ee67af33a698dfb435e7 /sys-cluster/ceph/files/ceph.initd-r2
parentChanged dev-qt/qtnetwork-5.11.2 patch. (diff)
downloadlibressl-2de5f67f60070e9c89bd24abad6d6c1f1d3773bb.tar.gz
libressl-2de5f67f60070e9c89bd24abad6d6c1f1d3773bb.tar.bz2
libressl-2de5f67f60070e9c89bd24abad6d6c1f1d3773bb.zip
ebuild with libressl USE flag
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'sys-cluster/ceph/files/ceph.initd-r2')
-rw-r--r--sys-cluster/ceph/files/ceph.initd-r240
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-cluster/ceph/files/ceph.initd-r2 b/sys-cluster/ceph/files/ceph.initd-r2
new file mode 100644
index 0000000..16267c5
--- /dev/null
+++ b/sys-cluster/ceph/files/ceph.initd-r2
@@ -0,0 +1,40 @@
+#!/sbin/openrc-run
+
+ceph_conf="${ceph_conf:-/etc/ceph/ceph.conf}"
+extra_commands="reload"
+daemon_type="${RC_SVCNAME#ceph-}"
+daemon_type="${daemon_type%.*}"
+daemon_id="${RC_SVCNAME#ceph-*.}"
+daemon_id="${daemon_id:-0}"
+command="/usr/bin/ceph-${daemon_type}"
+pidfile="/run/ceph/${daemon_type}.${daemon_id}.pid"
+command_args="-i ${daemon_id} --pid-file ${pidfile} -c ${ceph_conf}"
+start_stop_daemon_args="--user ceph --group ceph"
+
+depend() {
+ after net ntpd ntp-client chronyd
+ before netmount
+}
+
+is_type_valid() {
+ case ${daemon_type} in
+ mon|mds|osd) return 0;;
+ *) return 1;;
+ esac
+}
+
+start_pre() {
+ checkpath -d -q -o ceph "$(dirname "${pidfile}")"
+ if ! is_type_valid ;then
+ eerror "Please give valid Ceph Server Type: mds, mon, osd"
+ return 1
+ fi
+}
+
+reload() {
+ ebegin "Reloading Ceph ${daemon_type}.${daemon_id}"
+ start-stop-daemon --signal 1 ${start_stop_daemon_args} --pidfile "${pidfile}"
+ eend $?
+}
+
+# vim:ft=gentoo-init-d:ts=4:sts=4:sw=4:noet: