# INSTALL
case "$ACTION" in
post)
    if [ "$UPDATE" != "yes" ]; then
        # actions to execute if package is being installed.
        install -d usr/share/elasticsearch/plugins
        install -d -m0750 var/log/elasticsearch
        install -d -m0750 var/lib/elasticsearch/data
        chown -R elastic etc/elasticsearch
        chown -R elastic var/lib/elasticsearch/data
        chown -R elastic var/log/elasticsearch
    fi
    ;;
esac
