Fix httpd dir create to not error if exists
authorPradeep Kilambi <pkilambi@redhat.com>
Thu, 2 Mar 2017 16:53:26 +0000 (11:53 -0500)
committerPradeep Kilambi <pkilambi@redhat.com>
Fri, 3 Mar 2017 12:58:37 +0000 (12:58 +0000)
In cases where /var/log/httpd already exists, this exits with error
code 1.

$ sudo docker logs keystone-init-log
mkdir: cannot create directory '/var/log/httpd': File exists

Change-Id: I62bf08d9fc9e02d5f3016bd14bb0a090b76ac837

docker/services/keystone.yaml

index 644326e..e09fd76 100644 (file)
@@ -109,7 +109,7 @@ outputs:
             start_order: 0
             image: *keystone_image
             user: root
-            command: ['/bin/bash', '-c', 'mkdir /var/log/httpd && mkdir /var/log/keystone && chown keystone:keystone /var/log/keystone']
+            command: ['/bin/bash', '-c', 'mkdir -p /var/log/httpd && mkdir -p /var/log/keystone && chown keystone:keystone /var/log/keystone']
             volumes:
               - logs:/var/log
           keystone_db_sync: