slapd 364 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. #
  3. # /etc/rc.d/slapd: start/stop Stand-alone LDAP Daemon
  4. #
  5. SLAPD_PID=/var/openldap/run/slapd.pid
  6. case $1 in
  7. start)
  8. /usr/sbin/slapd
  9. ;;
  10. stop)
  11. if [ -f $SLAPD_PID ]; then
  12. kill -INT `head -1 $SLAPD_PID`
  13. else
  14. killall -q /usr/sbin/slapd
  15. fi
  16. ;;
  17. restart)
  18. $0 stop
  19. sleep 2
  20. $0 start
  21. ;;
  22. *)
  23. echo "usage: $0 [start|stop|restart]"
  24. ;;
  25. esac
  26. # End of file