X-Original-To: pgsql-admin-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 5FAFA9FB24E for ; Tue, 8 Aug 2006 08:54:06 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 96237-01 for ; Tue, 8 Aug 2006 11:54:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from infbssys.ips.cs.tu-bs.de (infbssys.ips.cs.tu-bs.de [134.169.32.1]) by postgresql.org (Postfix) with ESMTP id 1C1609FB221 for ; Tue, 8 Aug 2006 08:54:00 -0300 (ADT) Received: from is38 (is38 [134.169.32.148]) by infbssys.ips.cs.tu-bs.de (8.13.6+Sun/8.13.6) with ESMTP id k78Brw0k007516 for ; Tue, 8 Aug 2006 13:53:58 +0200 (CEST) From: Thomas Mack To: "'pgsql-admin@postgresql.org'" Subject: Re: Start-up script for Solaris Date: Tue, 8 Aug 2006 13:53:57 +0200 User-Agent: KMail/1.5.4 References: <9765373733A7DF4681B12225D2FC44058E2D08@bosexprod001.bostonstock.local> In-Reply-To: <9765373733A7DF4681B12225D2FC44058E2D08@bosexprod001.bostonstock.local> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200608081353.57676.mack@ifis.cs.tu-bs.de> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200608/89 X-Sequence-Number: 22633 Am Dienstag, 8. August 2006 13:27 schrieb mcelroy, tim: > Good morning, > > Curious if anyone out there has a start-up script for Solaris? A > version of the Linux /etc/init.d/postgresql one. I recently installed > postgres on a Solaris 9 box and although I can start up postgres it > fails to log to the log file as directed and just "doesn't look right", > like it does on Linux. > I have a rather old one, which originally started and stopped a 6.5.2 postgres on Solaris 5.6 . Now it does its job on 7.4 and Solaris 10. Thomas Mack ===================================================================== #!/bin/sh killproc() { # kill the named process(es) pid=`/usr/bin/ps -e -o pid,args | \ /usr/bin/grep "$1\>" | \ /usr/bin/grep -v "$0\>" | \ /usr/bin/grep -v grep | \ /usr/bin/awk '{print $1}'` [ "$pid" != "" ] && kill -s INT $pid [ "$pid" != "" ] && sleep 2 [ "$pid" != "" ] && kill -s QUIT $pid } # # Start/stop postgres # case "$1" in 'start') echo "Starting postgres74..." killproc postmaster /usr/bin/rm -f /usr/local/pgsql/data/postmaster.pid su - postgres -c "source /usr/local/pgsql/.tcshrc; limit descriptors 512; cd /usr/local/pgsql/bin; ./postmaster -i -p 6007 -o -e >>& server.log&" ;; 'stop') killproc postmaster # kill postmaster process /usr/bin/rm -f /tmp/.s.PGSQL.6007 ;; 'restart') $0 stop sleep 1 $0 start ;; *) echo "Usage: /etc/init.d/postgres74 { start | stop | restart }" ;; esac