Charm: ~matsubara:precise/oops-tools
Revision: 8
Hook: start
#!/bin/bash
set -eux # -x for verbose logging to juju debug-log
juju-log "Building oops-tools"
cd /var/www/oops-tools/
make
cp apache/oops-tools.dev.mod_wsgi /etc/apache2/sites-enabled/
# Change permission of oops-tools directory and files so apache can serve them.
find /var/www/oops-tools -type d -print0 | xargs -0 chmod 0755
find /var/www/oops-tools -type f -print0 | xargs -0 chmod 0744
# Disable the default apache site
a2dissite 000-default
/etc/init.d/apache2 restart