2015-12-08 21:41:07 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
script_root=`dirname $0`
|
2016-07-07 16:22:27 +00:00
|
|
|
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`
|
2015-12-08 21:41:07 +00:00
|
|
|
|
|
|
|
[ "$#" -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
|
2015-12-17 22:53:03 +00:00
|
|
|
asokfile=$run_root/out/radosgw.${port}.asok
|
2016-01-05 21:49:10 +00:00
|
|
|
logfile=$run_root/out/radosgw.${port}.log
|
2015-12-08 21:41:07 +00:00
|
|
|
|
2016-07-07 16:22:27 +00:00
|
|
|
$vstart_path/mstop.sh $name radosgw $port
|
2015-12-08 21:41:07 +00:00
|
|
|
|
2016-07-07 16:22:27 +00:00
|
|
|
$vstart_path/mrun $name radosgw --rgw-frontends="civetweb port=$port" --pid-file=$pidfile --admin-socket=$asokfile "$@" --log-file=$logfile
|