fi
}
+create_mgr_restful_secret() {
+ while ! ceph_adm -h | grep -c -q ^restful ; do
+ debug echo 'waiting for mgr restful module to start'
+ sleep 1
+ done
+ local secret_file
+ if ceph_adm restful create-self-signed-cert > /dev/null; then
+ secret_file=`mktemp`
+ ceph_adm restful create-key admin -o $secret_file
+ RESTFUL_SECRET=`cat $secret_file`
+ rm $secret_file
+ else
+ debug echo MGR Restful is not working, perhaps the package is not installed?
+ fi
+}
+
start_mgr() {
local mgr=0
local ssl=${DASHBOARD_SSL:-1}
fi
fi
fi
-
- while ! ceph_adm -h | grep -c -q ^restful ; do
- debug echo 'waiting for mgr restful module to start'
- sleep 1
- done
- if ceph_adm restful create-self-signed-cert; then
- SF=`mktemp`
- ceph_adm restful create-key admin -o $SF
- RESTFUL_SECRET=`cat $SF`
- rm $SF
- else
- debug echo MGR Restful is not working, perhaps the package is not installed?
- fi
+ create_mgr_restful_secret
fi
if [ "$cephadm" -eq 1 ]; then