5 rgw_frontend
=${RGW_FRONTEND:-"beast"}
6 script_root
=$
(dirname "$0")
7 script_root
=$
(cd "$script_root" && pwd)
8 [ -z "$BUILD_DIR" ] && BUILD_DIR
=build
9 if [ -e CMakeCache.txt
]; then
11 elif [ -e "$script_root"/..
/${BUILD_DIR}/CMakeCache.txt
]; then
12 cd "$script_root"/..
/${BUILD_DIR}
15 #ceph_bin=$script_root/bin
16 vstart_path
=$
(dirname "$0")
18 [ "$#" -lt 3 ] && echo "usage: $0 <name> <port> <ssl-port> [params...]" && exit 1
24 port_param
="port=$port"
26 if [ "$ssl_port" -gt 0 ]; then
27 cert_param
="ssl_certificate=./cert.pem"
28 if [ "$rgw_frontend" = "civetweb" ]; then
29 port_param
="port=${port} port=${ssl_port}s"
31 port_param
="port=${port} ssl_port=${ssl_port}"
35 if [ -n "$RGW_FRONTEND_THREADS" ]; then
36 set_frontend_threads
="num_threads=$RGW_FRONTEND_THREADS"
41 run_root
=$script_root/run
/$name
42 pidfile
=$run_root/out
/radosgw.
${port}.pid
43 asokfile
=$run_root/out
/radosgw.
${port}.asok
44 logfile
=$run_root/out
/radosgw.
${port}.log
46 "$vstart_path"/mstop.sh
"$name" radosgw
"$port"
48 "$vstart_path"/mrun
"$name" ceph
-c "$run_root"/ceph.conf \
49 -k "$run_root"/keyring auth get-or-create client.rgw.
"$port" mon \
50 'allow rw' osd
'allow rwx' mgr
'allow rw' >> "$run_root"/keyring
52 "$vstart_path"/mrun
"$name" radosgw
--rgw-frontends="$rgw_frontend $port_param $set_frontend_threads $cert_param" \
53 -n client.rgw.
"$port" --pid-file="$pidfile" \
54 --admin-socket="$asokfile" "$@" --log-file="$logfile"