#!/bin/bash
set -x

SCRIPTDIR=$(dirname $0)

if [ -f /etc/debian_version ]; then
    install-packages docker.io
    update-rc.d docker.io defaults

elif [ -f /etc/redhat-release ]; then
    install-packages docker-io
    systemctl enable docker.service
fi

pip install docker-py

install -D -g root -o root -m 0755 ${SCRIPTDIR}/hook-docker.py /var/lib/heat-config/hooks/docker