mirror of
https://github.com/ceph/ceph
synced 2024-12-18 17:37:38 +00:00
eeb394e04c
Similar to mstart and mstop, mrgw also needs to find the correct build dir as we pass in the pidfile and asokfile which otherwise falls back to src/run dir. Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
30 lines
706 B
Bash
Executable File
30 lines
706 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
script_root=`dirname $0`
|
|
script_root=`(cd $script_root;pwd)`
|
|
if [ -e CMakeCache.txt ]; then
|
|
script_root=$PWD
|
|
elif [ -e $root_path/../build/CMakeCache.txt ]; then
|
|
cd $root_path/../build
|
|
script_root=$PWD
|
|
fi
|
|
vstart_path=`dirname $0`
|
|
|
|
[ "$#" -lt 2 ] && echo "usage: $0 <name> <port> [params...]" && exit 1
|
|
|
|
name=$1
|
|
port=$2
|
|
|
|
shift 2
|
|
|
|
run_root=$script_root/run/$name
|
|
pidfile=$run_root/out/radosgw.${port}.pid
|
|
asokfile=$run_root/out/radosgw.${port}.asok
|
|
logfile=$run_root/out/radosgw.${port}.log
|
|
|
|
$vstart_path/mstop.sh $name radosgw $port
|
|
|
|
$vstart_path/mrun $name radosgw --rgw-frontends="civetweb port=$port" --pid-file=$pidfile --admin-socket=$asokfile "$@" --log-file=$logfile
|