Signed-off-by: Sage Weil <sage@redhat.com>
. /lib/lsb/init-functions
+# detect systemd
+SYSTEMD=0
+grep -qs systemd /proc/1/comm && SYSTEMD=1
+
# if we start up as ./init-ceph, assume everything else is in the
# current directory too.
if [ `dirname $0` = "." ] && [ $PWD != "/etc/init.d" ]; then
SBINDIR=.
LIBDIR=.
ETCDIR=.
+ SYSTEMD=0
else
BINDIR=@bindir@
SBINDIR=@prefix@/sbin
EXIT_STATUS=0
-# detect systemd
-SYSTEMD=0
-grep -qs systemd /proc/1/comm && SYSTEMD=1
-
signal_daemon() {
name=$1
daemon=$2