ungleich-tools/ceph-mgr-create-start

28 lines
545 B
Text
Raw Normal View History

2018-02-15 22:59:55 +00:00
#!/bin/sh
name=$(hostname)
CEPH_PATH=/var/lib/ceph
MGR_PATH=$CEPH_PATH/mgr/ceph-$name
if [ -e "$MGR_PATH" ]; then
echo "$MGR_PATH exists - aborting"
exit 1
fi
mkdir "$MGR_PATH"
chown ceph:ceph "$MGR_PATH"
touch "$MGR_PATH/sysvinit"
ceph auth get-or-create mgr.$name \
mon 'allow profile mgr' \
osd 'allow *' \
mds 'allow *' > "$MGR_PATH/keyring"
2018-02-15 23:01:13 +00:00
2018-03-08 13:46:14 +00:00
# Starting with monit, if available
if [ -e /etc/monit ]; then
/opt/ungleich-tools/monit-ceph-create-start mgr.${name}
else
/etc/init.d/ceph start mgr.${name}
fi