Re: Success !!

From: Oliver Mueschke <oliver(dot)mueschke(at)gmx(dot)net>
To: John Bright <johnbr(at)vossnet(dot)co(dot)uk>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Success !!
Date: 1998-06-29 21:44:30
Message-ID: 35980ABE.882E8D8F@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

John Bright wrote:
>
> Oliver,
> I tried your script.
> I get the weirdest thing happening.
> I added it as a file called postgres to the directory /sbin/init.d.
> I created the two symbolic links in the subdirectory
> as ln -s ../postgres S86postgres and K05postgres.
> When I to run the script by typing
> /sbin/init.d/postgres start, the script bombs out saying
> No such file or directory.
> I know the script will work because if I type
> su - postgres -c "...etc .....etc " it brings up the postmaster
> for me, and killproc similarly typed at the command line
> shuts down the postmaster.
> Have you got any ideas ?
> Weird city or what ?
> Regards
> John

oh,
probably a matter of my mail prog wrapping "long" lines before sending.
i turned this feature explicitly off and pasted the script again:
----------------------------------------------------------------------
#! /bin/sh
#
# postgres.init Start postgres back end system.
#
# Author: Thomas Lockhart <Thomas(dot)Lockhart(at)jpl(dot)nasa(dot)gov>
# based on news startup by David Myers
#
# Modified by Daniele Arduini:
# - support for bash shell
# - /usr/local/pgsql installation
#
# Assumptions:
# - the postgres user is named "postgres"
# - the postgres user is running bash
# - /etc/syslog.conf contains the line "local5.* -/var/log/postgres"

[ -f /usr/local/pgsql/bin/postmaster ] || exit 0

# See how we were called.
case "$1" in
start)
echo -n "Starting postgresql service: "
# force full login to get path names and environment variables
# postgres runs bash so use proper syntax in redirection
# change this line if the postgres superuser account is not "postgres"
# change this line if another shell syntax is necessary
su postgres -c 'nohup /usr/local/pgsql/bin/postmaster -i -B 256 \
-D/usr/local/pgsql/data 2>&1 | logger -p local5.notice &'
sleep 2
pid=`pidof postmaster`
echo -n "postmaster [$pid]"
touch /var/lock/subsys/postmaster
echo
;;
stop)
echo -n "Stopping postgresql service: "
killproc /usr/local/pgsql/bin/postmaster
sleep 2
rm -f /var/lock/subsys/postmaster
echo
;;
*)
echo "Usage: postgres.init {start|stop}"
exit 1
esac

exit 0
---------------------------------------------------------------------------

any better this time?
just curious: did you get answers for your perl questions?

oliver

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeffrey Napolitano 1998-06-30 23:22:38 Re: [ADMIN] Importing data
Previous Message John Bright 1998-06-29 20:26:00 Re: Success !!