summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components/sqldb
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/components/sqldb/pgsql-standby-conf24
-rwxr-xr-xsca-cpp/trunk/components/sqldb/standby-test2
2 files changed, 13 insertions, 13 deletions
diff --git a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf
index 3b4aa6dff5..cbfd90b48c 100755
--- a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf
+++ b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf
@@ -22,19 +22,8 @@ here=`readlink -f $0`; here=`dirname $here`
mkdir -p $1
root=`readlink -f $1`
-# Master server address
-if [ "$2" = "" ]; then
- mhost="localhost"
- mport="5432"
- mhttpport="80"
-else
- mhost="$2"
- mport="$3"
- mhttpport="$4"
-fi
-
# Server address
-addr=$5
+addr=$2
if [ "$addr" = "" ]; then
ip="*"
port="5432"
@@ -46,6 +35,17 @@ else
port=`$here/../../modules/http/httpd-addr port $addr`
fi
+# Master server address
+if [ "$3" = "" ]; then
+ mhost="localhost"
+ mport="5432"
+ mhttpport="80"
+else
+ mhost="$3"
+ mport="$4"
+ mhttpport="$5"
+fi
+
pgsql_prefix=`cat $here/pgsql.prefix`
mkdir -p $root/sqldb/data
chmod 700 $root/sqldb/data
diff --git a/sca-cpp/trunk/components/sqldb/standby-test b/sca-cpp/trunk/components/sqldb/standby-test
index e572de6fe2..9e56bfc039 100755
--- a/sca-cpp/trunk/components/sqldb/standby-test
+++ b/sca-cpp/trunk/components/sqldb/standby-test
@@ -25,7 +25,7 @@
./pgsql localhost 5432 "create table test(key text, value text);" 1>/dev/null 2>&1
../../modules/http/httpd-start tmp/master
sleep 2
-./pgsql-standby-conf tmp/standby localhost 5432 8090 5433
+./pgsql-standby-conf tmp/standby 5433 localhost 5432 8090
./pgsql-start tmp/standby
# Test