blob: 08d1067a7ecc8da970256acbc425e82bcb7d41ed [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001#! /bin/sh
2#
3# This is an init script for openembedded
4# Copy it to /etc/init.d/openldap and type
5# > update-rc.d openldap defaults 60
6#
7
8# Source function library.
9. /etc/init.d/functions
10
11slapd=/usr/sbin/slapd
12test -x "$slapd" || exit 0
13
14
15case "$1" in
16 start)
17 echo -n "Starting OpenLDAP: "
18 start-stop-daemon --start --quiet --exec $slapd
19 echo "."
20 ;;
21 stop)
22 echo -n "Stopping OpenLDAP: "
23 start-stop-daemon --stop --quiet --pidfile /var/run/slapd.pid
24 echo "."
25 ;;
26 status)
27 status $slapd;
28 exit $?
29 ;;
30 *)
31 echo "Usage: /etc/init.d/openldap {start|stop|status}"
32 exit 1
33esac
34
35exit 0