Browse Source

fix missing dir after they have been removed from image volumes

Bertrand Gouny 9 years ago
parent
commit
23da307fe3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      image/service/slapd/startup.sh

+ 4 - 0
image/service/slapd/startup.sh

@@ -10,6 +10,10 @@ log-helper level eq trace && set -x
 # see https://github.com/docker/docker/issues/8231
 ulimit -n 1024
 
+# create dir if they not already exists
+[ -d /var/lib/ldap ] || mkdir -p /var/lib/ldap
+[ -d /etc/ldap/slapd.d ] || mkdir -p /etc/ldap/slapd.d
+
 # fix file permissions
 chown -R openldap:openldap /var/lib/ldap
 chown -R openldap:openldap /etc/ldap