#!/bin/sh

USER=imip-agent
GROUP=lmtp
INSTALL_DIR=/var/lib/imip-agent
WEB_INSTALL_DIR=/var/www/imip-agent

for DIR in "$INSTALL_DIR"/store "$INSTALL_DIR"/preferences "$WEB_INSTALL_DIR"/static ; do
    mkdir -p "$DIR"
    chown "$USER" "$DIR"
    chgrp "$GROUP" "$DIR"
    chmod g+ws "$DIR"
done
