File debian.postinst of Package contrail-federation-web

#!/bin/sh
set -e

# Automatically added by dh_installdocs
if [ "$1" = "configure" ]; then
  cd /usr/lib/contrail/federation/federation-web  

  python2.6 offline_bootstrap.py
  ./bin/buildout -No
  
  ./bin/django default_settings > /etc/contrail/federation/federation-web.conf
  ./bin/django collectstatic --noinput
  
  cp extra/apache-vhost /etc/apache2/sites-available/contrail-federation-web
  
  a2dissite default || true
  a2ensite contrail-federation-web || true
  
  useradd -M contrail || true
  
  chown contrail:contrail /var/lib/contrail/federation/federation-web -R
  
  /etc/init.d/apache2 reload 3>/dev/null || true
fi