3 # It seems this was designed as /etc/init.d/ceph script for controlling the systemd
4 # units on SuSE, made into 'cephctl' for PLD
7 [ -f /etc/sysconfig/ceph ] && . /etc/sysconfig/ceph
8 cluster=${CLUSTER:-ceph}
11 # Shared variables by many actions
12 dir_mon="/var/lib/ceph/mon/"
13 dir_osd="/var/lib/ceph/osd/"
14 if test -d ${dir_mon} ; then
15 lmon=`ls ${dir_mon} | grep ${cluster}`
17 if test -d ${dir_osd} ; then
18 losd=`ls ${dir_osd} | grep ${cluster}`
24 if test -n "$config" ; then
25 systemctl "${action}" "ceph-mon@${config}.service" || RC=1
28 start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed | reload )
30 if test -n ${lmon} ; then
31 for s in ${lmon#=${prefix}} ; do
32 systemctl "${action}" ceph-mon@${s#$prefix}.service
37 if test -n ${lmon} ; then
38 for s in ${losd#=${prefix}} ; do
39 systemctl "${action}" ceph-osd@${s#$prefix}.service
46 echo "Invalid paramter : $action"
47 echo "Valid paramters : start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed | reload"