~adeuring/lp-dev-utils/select.error-withour-errno-attr

« back to all changes in this revision

Viewing changes to ec2test/testrunner.py

  • Committer: William Grant
  • Date: 2012-05-03 12:59:05 UTC
  • Revision ID: william.grant@canonical.com-20120503125905-0crq0uvn6t0e6osb
Unbreak OpenID on ec2 demo by making Apache listen on all interfaces, not just the external. The appserver will try to connect to testopenid.dev over lo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
447
447
        p('sudo a2enmod headers > /dev/null')
448
448
        # Install apache config file.
449
449
        p('cd /var/launchpad/test/; sudo make install')
450
 
        # Use raw string to eliminate the need to escape the backslash.
451
 
        # Put eth0's ip address in the /tmp/ip file.
452
 
        p(r"ifconfig eth0 | grep 'inet addr' "
453
 
          r"| sed -re 's/.*addr:([0-9.]*) .*/\1/' > /tmp/ip")
454
 
        # Replace 127.0.0.88 in Launchpad's apache config file with the
455
 
        # ip address just stored in the /tmp/ip file. Perl allows for
456
 
        # inplace editing unlike sed.
457
 
        p('sudo perl -pi -e "s/127.0.0.88/$(cat /tmp/ip)/g" '
 
450
        # Fix Launchpad's Apache config file to listen on all
 
451
        # interfaces, not just loopback.
 
452
        p('sudo sed -i "s/127.0.0.88/*/g" '
458
453
          '/etc/apache2/sites-available/local-launchpad')
459
454
        # Restart apache.
460
455
        p('sudo /etc/init.d/apache2 restart')