forked from couchbase/couchbase-lite-net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
start_gateway
executable file
·20 lines (20 loc) · 774 Bytes
/
start_gateway
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
echo Starting sync_gateway with option "'$1'"...
current=`pwd`
echo "$current"
if [ "$1" == "--use-server" ]; then
pid=`cat ~/Library/Application\ Support/Couchbase/couchbase-server.pid`
running=`ps aux | grep "$pid" | grep -v grep`
if [ "$running" == "" ]; then
echo Starting Couchbase Server...
#`cd "/Applications/Couchbase\ Server.app/Contents/Resources";./start-server.sh"` &
/Applications/Couchbase\ Server.app/Contents/MacOS/Couchbase\ Server&
sleep 15
else
echo Couchbase Server is currently running.
fi
cd "$current"
Tools/sync_gateway -pretty -verbose=true src/Couchbase.Lite.Tests.Shared/Assets/GatewayConfigCouchbaseServer.json
else
Tools/sync_gateway -pretty -verbose=true src/Couchbase.Lite.Tests.Shared/Assets/GatewayConfig.json
fi