From owner-freebsd-questions@FreeBSD.ORG Thu Oct 28 15:54:03 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6B911065706 for ; Thu, 28 Oct 2010 15:54:03 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail7.sea5.speakeasy.net (mail7.sea5.speakeasy.net [69.17.117.52]) by mx1.freebsd.org (Postfix) with ESMTP id B08958FC2A for ; Thu, 28 Oct 2010 15:54:03 +0000 (UTC) Received: (qmail 16727 invoked from network); 28 Oct 2010 15:54:00 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail7.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 28 Oct 2010 15:54:00 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id A391B5082F; Thu, 28 Oct 2010 11:53:58 -0400 (EDT) From: Lowell Gilbert To: Tim Dunphy References: Date: Thu, 28 Oct 2010 11:53:58 -0400 In-Reply-To: (Tim Dunphy's message of "Thu, 28 Oct 2010 11:44:03 -0400") Message-ID: <44fwvqwbxl.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: start slapd automatically X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 Oct 2010 15:54:03 -0000 Tim Dunphy writes: > I have a quick one for ya.. I am running openLDAP 2.4 server on my > freebsd box and it's coming along nicely. > > But whenever I reboot the box it doesn't start automatically. What's > the best way to accomplish this? > > My /etc/defaults/rc.conf has the following entry: > > local_startup="/usr/local/etc/rc.d" # startup script dirs. > > And slapd is living in the location referenced on that line: > > > [root@LBSD2:/usr/home/bluethundr]#ls -l /usr/local/etc/rc.d/slapd > -r-xr-xr-x 1 root wheel 3591 Oct 9 21:37 /usr/local/etc/rc.d/slapd > > > So I am under the impression that it should be starting there normally. You probably missed the rc.conf entry, described in the message that was printed when you installed the port. Specifically: In order to run the LDAP server, you need to edit %%PREFIX%%/etc/openldap/slapd.conf to suit your needs and add the following lines to /etc/rc.conf: slapd_enable="YES" slapd_flags='-h "ldapi://%2fvar%2frun%2fopenldap%2fldapi/ ldap://0.0.0.0/"' slapd_sockets="/var/run/openldap/ldapi" Then start the server with %%PREFIX%%/etc/rc.d/slapd start or reboot. Where %%PREFIX%% is presumably /usr/local.