From owner-freebsd-questions@FreeBSD.ORG Mon Apr 2 19:09:34 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A802316A403 for ; Mon, 2 Apr 2007 19:09:34 +0000 (UTC) (envelope-from cfarinella@appropriatesolutions.com) Received: from mail.appropriatesolutions.com (static-63-131-36-2.man.onecommunications.net [63.131.36.2]) by mx1.freebsd.org (Postfix) with ESMTP id 7486B13C457 for ; Mon, 2 Apr 2007 19:09:34 +0000 (UTC) (envelope-from cfarinella@appropriatesolutions.com) Received: from localhost (localhost.appropriatesolutions.com [127.0.0.1]) by mail.appropriatesolutions.com (Postfix) with ESMTP id 085D83C67B; Mon, 2 Apr 2007 15:09:33 -0400 (EDT) X-Virus-Scanned: amavisd-new at appropriatesolutions.com Received: from mail.appropriatesolutions.com ([127.0.0.1]) by localhost (mail1.appropriatesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bQxTyTRRiIDq; Mon, 2 Apr 2007 15:09:29 -0400 (EDT) Received: from [192.168.24.123] (whiterabbit.appropriatesolutions.com [63.131.36.31]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cfarinella) by mail.appropriatesolutions.com (Postfix) with ESMTP id 091E13C678; Mon, 2 Apr 2007 15:09:28 -0400 (EDT) Message-ID: <461154E9.8030208@appropriatesolutions.com> Date: Mon, 02 Apr 2007 15:09:29 -0400 From: Charles Farinella User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: Warren Block References: <46113D03.6000604@appropriatesolutions.com> <20070402120758.M34595@wonkity.com> In-Reply-To: <20070402120758.M34595@wonkity.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: automatically starting PostgreSQL X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 19:09:34 -0000 Warren Block wrote: > On Mon, 2 Apr 2007, Charles Farinella wrote: > >> I built PostgreSQL from source > > In other words, not from ports? Or if it was from ports, which port? > >> and copied the supplied startup script to /etc/rc.d/postgresql. The >> script works as expected. > > Yes, but that's not where it should be in FreeBSD, if that's even a > startup script meant for FreeBSD. > >> In /etc/rc.conf I've added the following: >> >> postgresql_enable="YES" >> >> expecting this to automatically start PostgeSQL at boot, yet this >> doesn't happen and there is nothing in any error log that I can find >> that mentions any failure. > > For that to work, you'd have to have the (correct) script in > /usr/local/etc/rc.d. Remove the source version of PostgreSQL and > install it from the appropriate port, and the port will install the > right script in the right place. Thank you all for the responses, please help me understand how this works. For reasons having to do with our particular operation, it is our custom to build many packages from source code no matter the operating system, so I don't want to install from the ports tree. The script I used is one which is part of the PostgreSQL package and is specifically for FreeBSD. As I said the script works as expected. '/etc/rc.d/postgresql start|stop|restart' all work. I also have a duplicate script in /usr/local/etc/rc.d which also works as expected when run manually. Neither of these start the server at boot time. I have an apache2 installation also built from source code, and also with a script from an external source, also placed in /etc/rc.d and referenced by the line 'apache2_enable="YES"', and this *does* start at boot time. So I am a little confused as to what I need to do. If I add .sh to /usr/local/etc/rc.d/postgresql, in my /etc/rc.conf do I change my reference line to 'enable_postgresql.sh="YES"'? thanks again for the help. --charlie -- ------------------------------------------------------------------------ Charles Farinella Appropriate Solutions, Inc. (www.AppropriateSolutions.com) cfarinella@AppropriateSolutions.com voice: 603.924.6079 fax: 603.924.8668