#!/bin/bash

LDH_DIRS="/opt/purist/middleware/ \
          /opt/purist/middleware_virtualenv/ \
          /etc/opt/purist/middleware/ \
          /var/log/purist/middleware/ \
          /var/opt/purist/middleware/static/ \
          /var/opt/purist/brand/ \
          /var/opt/purist/downloads"

for i in ${LDH_DIRS}; do
    mkdir -p $i;
done

# Set www-data as owner of some dirs

chown www-data:www-data /var/log/uwsgi/app
chown --recursive www-data:www-data /var/opt/purist
