diff options
Diffstat (limited to '')
-rwxr-xr-x | sca-cpp/trunk/components/sqldb/pgsql-standby-conf | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf index 5fcb7128f2..291d950e94 100755 --- a/sca-cpp/trunk/components/sqldb/pgsql-standby-conf +++ b/sca-cpp/trunk/components/sqldb/pgsql-standby-conf @@ -47,14 +47,21 @@ else fi pgsql_prefix=`cat $here/pgsql.prefix` + +if [ -f "$root/sqldb/log.conf" ]; then + pgsql_log=`cat $root/sqldb/log.conf` +else + mkdir -p $root/logs + pgsql_log="cat >>$root/logs/postgresql" +fi + mkdir -p $root/sqldb/data chmod 700 $root/sqldb/data mkdir -p $root/sqldb/archive -mkdir -p $root/logs # Initialize from a backup of the master if [ ! -f $root/sqldb/data/postgresql.conf ]; then - (wget http://$mhost:$mhttpport/pgsql-backup -O - | tar -C $root/sqldb -xz) 1>>$root/logs/postgresql 2>&1 + (wget http://$mhost:$mhttpport/pgsql-backup -O - | tar -C $root/sqldb -xz) 2>&1 | $pgsql_log rm -rf $root/sqldb/data/postmaster.pid $root/sqldb/data/pg_xlog mkdir -p $root/sqldb/data/pg_xlog/archive_status chmod 700 $root/sqldb/data/pg_xlog/archive_status |