forked from ~ljy/RK356X_SDK_RELEASE

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