~charmers/charms/oneiric/oops-tools/trunk

« back to all changes in this revision

Viewing changes to hooks/start

  • Committer: Diogo Matsubara
  • Date: 2012-01-30 18:54:13 UTC
  • Revision ID: diogo.matsubara@canonical.com-20120130185413-0qpoi4shotdkc4dk
remove unnecessary sed edits to wsgi file in start hook and change oops-tools dir permission so apache can serve the files correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
juju-log "Building oops-tools"
4
4
cd /var/www/oops-tools/
5
5
make
6
 
#XXX shouldn't be doing this here.
7
 
sed -i "s/NameVirtualHost.*$//" apache/oops-tools.dev.mod_wsgi
8
 
sed -i "s/127.0.0.55/*/" apache/oops-tools.dev.mod_wsgi
9
 
host=`unit-get public-address`
10
 
sed -i "s/ServerName.*/ServerName $host/" apache/oops-tools.dev.mod_wsgi
11
6
cp apache/oops-tools.dev.mod_wsgi /etc/apache2/sites-enabled/
12
 
chmod 755 -R /var/www/oops-tools/
 
7
# Change permission of oops-tools directory so apache can serve them.
 
8
find /var/www/oops-tools -type d -print0 | xargs -0 chmod 0755
13
9
/etc/init.d/apache2 restart