Ré-organisatrion stage3 et stage5 comme les stages 0 à 2
[hvlinux.git] / stage5 / bootscripts / openldap
diff --git a/stage5/bootscripts/openldap b/stage5/bootscripts/openldap
new file mode 100755 (executable)
index 0000000..2896184
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# openldap
+
+# Source functions library
+source /etc/rc.d/init.d/functions
+
+log_script_name "$0 $*"
+
+piddir=/srv/ldap/run
+
+case "$1" in
+    start)
+       cmd_run_log_box_warn "Starting LDAP Server" loadproc slapd
+        ;;
+    
+    stop)
+       cmd_run_log_box_warn "Stopping LDAP Server" killproc_path slapd ${piddir}
+        ;;
+                
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+        ;;
+
+    status)
+       statusproc_path slapd ${piddir}
+        ;;
+    
+    *)
+       echo "Usage: $0 {start|stop|restart|status}"
+       exit ${EXIT_CODE_FAILURE}
+       ;;
+esac
+
+exit $?