Skip to content

Commit 1f0cf56

Browse files
committed
Update startup scripts for Linux and FreeBSD.
Kevin Grittner
1 parent 28cdf5f commit 1f0cf56

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

contrib/start-scripts/freebsd

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# Created through merger of the Linux start script by Ryan Kirkpatrick
77
# and the script in the FreeBSD ports collection.
88

9-
# $PostgreSQL: pgsql/contrib/start-scripts/freebsd,v 1.5 2009/08/27 16:59:38 tgl Exp $
9+
# $PostgreSQL: pgsql/contrib/start-scripts/freebsd,v 1.6 2010/02/23 22:15:35 momjian Exp $
1010

1111
## EDIT FROM HERE
1212

@@ -36,7 +36,14 @@ DAEMON="$prefix/bin/postmaster"
3636
PGCTL="$prefix/bin/pg_ctl"
3737

3838
# Only start if we can find the postmaster.
39-
test -x "$DAEMON" || exit 0
39+
test -x $DAEMON ||
40+
{
41+
echo "$DAEMON not found"
42+
if [ "$1" = "stop" ]
43+
then exit 0
44+
else exit 5
45+
fi
46+
}
4047

4148
case $1 in
4249
start)

contrib/start-scripts/linux

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
# Original author: Ryan Kirkpatrick <pgsql@rkirkpat.net>
2626

27-
# $PostgreSQL: pgsql/contrib/start-scripts/linux,v 1.10 2010/01/11 18:39:32 tgl Exp $
27+
# $PostgreSQL: pgsql/contrib/start-scripts/linux,v 1.11 2010/02/23 22:15:35 momjian Exp $
2828

2929
## EDIT FROM HERE
3030

@@ -64,7 +64,15 @@ PGCTL="$prefix/bin/pg_ctl"
6464
set -e
6565

6666
# Only start if we can find the postmaster.
67-
test -x $DAEMON || exit 0
67+
test -x $DAEMON ||
68+
{
69+
echo "$DAEMON not found"
70+
if [ "$1" = "stop" ]
71+
then exit 0
72+
else exit 5
73+
fi
74+
}
75+
6876

6977
# Parse command line parameters.
7078
case $1 in

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy