summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Momjian2010-02-23 22:15:35 +0000
committerBruce Momjian2010-02-23 22:15:35 +0000
commit1f0cf56be2b3289a1d46c503bbaef602720a3fe7 (patch)
treecfca34068dfa1755faa5d77990e68873bb83260c
parent28cdf5f7ab83717ad76773ab1a24e957e91a193d (diff)
Update startup scripts for Linux and FreeBSD.
Kevin Grittner
-rw-r--r--contrib/start-scripts/freebsd11
-rw-r--r--contrib/start-scripts/linux12
2 files changed, 19 insertions, 4 deletions
diff --git a/contrib/start-scripts/freebsd b/contrib/start-scripts/freebsd
index 10ea4824986..7e9b103ec09 100644
--- a/contrib/start-scripts/freebsd
+++ b/contrib/start-scripts/freebsd
@@ -6,7 +6,7 @@
# Created through merger of the Linux start script by Ryan Kirkpatrick
# and the script in the FreeBSD ports collection.
-# $PostgreSQL: pgsql/contrib/start-scripts/freebsd,v 1.5 2009/08/27 16:59:38 tgl Exp $
+# $PostgreSQL: pgsql/contrib/start-scripts/freebsd,v 1.6 2010/02/23 22:15:35 momjian Exp $
## EDIT FROM HERE
@@ -36,7 +36,14 @@ DAEMON="$prefix/bin/postmaster"
PGCTL="$prefix/bin/pg_ctl"
# Only start if we can find the postmaster.
-test -x "$DAEMON" || exit 0
+test -x $DAEMON ||
+{
+ echo "$DAEMON not found"
+ if [ "$1" = "stop" ]
+ then exit 0
+ else exit 5
+ fi
+}
case $1 in
start)
diff --git a/contrib/start-scripts/linux b/contrib/start-scripts/linux
index e1ea1e3da4b..dd73e42d173 100644
--- a/contrib/start-scripts/linux
+++ b/contrib/start-scripts/linux
@@ -24,7 +24,7 @@
# Original author: Ryan Kirkpatrick <[email protected]>
-# $PostgreSQL: pgsql/contrib/start-scripts/linux,v 1.10 2010/01/11 18:39:32 tgl Exp $
+# $PostgreSQL: pgsql/contrib/start-scripts/linux,v 1.11 2010/02/23 22:15:35 momjian Exp $
## EDIT FROM HERE
@@ -64,7 +64,15 @@ PGCTL="$prefix/bin/pg_ctl"
set -e
# Only start if we can find the postmaster.
-test -x $DAEMON || exit 0
+test -x $DAEMON ||
+{
+ echo "$DAEMON not found"
+ if [ "$1" = "stop" ]
+ then exit 0
+ else exit 5
+ fi
+}
+
# Parse command line parameters.
case $1 in