start slapd automatically

Lowell Gilbert freebsd-questions-local at be-well.ilk.org
Thu Oct 28 15:54:03 UTC 2010


Tim Dunphy <bluethundr at gmail.com> 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 at 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.



More information about the freebsd-questions mailing list