|
From: <haw...@us...> - 2007-04-02 13:20:19
|
Revision: 156
http://pgsqlformac.svn.sourceforge.net/pgsqlformac/?rev=156&view=rev
Author: hawkmoon
Date: 2007-04-02 06:20:17 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
updated for manual override
'
-This line, and those below, will be ignored--
M PostgreSQL/PostgreSQL
Modified Paths:
--------------
trunk/StartupItem/PostgreSQL/PostgreSQL
Modified: trunk/StartupItem/PostgreSQL/PostgreSQL
===================================================================
--- trunk/StartupItem/PostgreSQL/PostgreSQL 2007-03-19 01:08:52 UTC (rev 155)
+++ trunk/StartupItem/PostgreSQL/PostgreSQL 2007-04-02 13:20:17 UTC (rev 156)
@@ -9,6 +9,11 @@
# History
# -------
#
+# 2007-04-02 Andy Satori <dr...@dr...>
+# Added manual-restart manual-start options for use with the
+# startup manager and allow the user to use hostconfig properly.
+# (probably last change before moving to launchd for leopard)
+#
# 2005-02-28 Andy Satori <dr...@dr... >
# Modified to resolve issues with the Postgres user not having a
# Shell defined (su -m)
@@ -52,13 +57,19 @@
StartService ()
{
-
+ shouldStartPostgres="-NO-"
+
if [ "${POSTGRES:=-YES-}" = "-YES-" ]; then
-
-
+ shouldStartPostgres="-YES-"
+ fi
+
+ if [ "$overrideEnvironment" = "-YES-" ]; then
+ shouldStartPostgres="-YES-"
+ fi
+
+ if [ "$shouldStartPostgres" = "-YES-" ]; then
ConsoleMessage "Starting PostgreSQL database server"
su -m postgres -c '/Library/PostgreSQL8/bin/pg_ctl start -D /Library/PostgreSQL8/data -l /Library/PostgreSQL8/log/PostgreSQL8.log -o -i'
-
fi
}
@@ -84,5 +95,8 @@
}
+if [ "$2" = "MANUAL" ]; then
+ overrideEnvironment='-YES-'
+fi
RunService "$1"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|