summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/components/sqldb/pgsql-stop
diff options
context:
space:
mode:
authorjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-12-30 19:52:29 +0000
committerjsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68>2011-12-30 19:52:29 +0000
commit85d3307d7670dc1b8b0d3ffab814e518e7f0a771 (patch)
tree50b2fc37daf64ffd0fe3dcb801e3f97f7d9f1ba7 /sca-cpp/trunk/components/sqldb/pgsql-stop
parent681567b28116421496c4b7560a5b70f9730b8a79 (diff)
Add external configuration of Memcached and PostgreSQL logging, to allow the logs to be piped to Scribe or the HTTPD log rotation program.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1225904 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rwxr-xr-xsca-cpp/trunk/components/sqldb/pgsql-stop11
1 files changed, 9 insertions, 2 deletions
diff --git a/sca-cpp/trunk/components/sqldb/pgsql-stop b/sca-cpp/trunk/components/sqldb/pgsql-stop
index e226b35d0d..9c5c9aae57 100755
--- a/sca-cpp/trunk/components/sqldb/pgsql-stop
+++ b/sca-cpp/trunk/components/sqldb/pgsql-stop
@@ -22,6 +22,13 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h
root=`echo "import os; print os.path.realpath('$1')" | python`
pgsql_prefix=`cat $here/pgsql.prefix`
-mkdir -p $root/logs
-$pgsql_prefix/bin/pg_ctl stop -w -D $root/sqldb/data 1>>$root/logs/postgresql 2>&1
+
+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
+
+$pgsql_prefix/bin/pg_ctl stop -w -D $root/sqldb/data 2>&1 | $pgsql_log