~ubuntu-branches/ubuntu/saucy/whoopsie-daisy/saucy

« back to all changes in this revision

Viewing changes to backend/setup/init_webserver.sh

  • Committer: Package Import Robot
  • Author(s): Evan Dandrea
  • Date: 2012-03-29 11:37:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329113751-stn0ci5vfgzx6cne
Tags: 0.1.24
* Add the file listing of /var/crash to whoopsie bug reports. Taken
  from apport's package hook.
* Fix cppcheck call in make check.
* Monitor network connectivity using NetworkManager and GNetworkMonitor.
  Do not report being online and able to report crashes if the user only
  has 3G or dial-up connectivity, or if there is no route.
* Do not upload crashes multiple times if the file attributes for
  their .upload files change while on the report queue.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
exec >/var/log/cloud-init.log 2>&1
 
3
packages="apache2 libapache2-mod-wsgi bzr nfs-kernel-server python-bson python-pycassa python-amqplib oops-repository"
 
4
echo "deb http://archive.admin.canonical.com lucid-cat main" >> /etc/apt/sources.list
 
5
sudo apt-get update
 
6
DEBCONF_FRONTEND=noninteractive sudo apt-get -y install $packages
 
7
# Enable mod_rewrite.
 
8
sudo a2enmod rewrite
 
9
cat > /etc/exports << EOF
 
10
/srv/cores 10.55.60.0/24(rw,sync,no_subtree_check)
 
11
EOF
 
12
sudo exportfs -ra
 
13
cat > /etc/apache2/sites-enabled/000-default << EOF
 
14
WSGIPythonPath /var/www/whoopsie-daisy/backend
 
15
<VirtualHost *:80>
 
16
        ServerAdmin webmaster@localhost
 
17
 
 
18
        DocumentRoot /var/www/whoopsie-daisy/backend
 
19
        WSGIScriptAlias / /var/www/whoopsie-daisy/backend/submit.wsgi
 
20
        RewriteEngine on
 
21
        RewriteRule ^/([^/]+)/submit-core/([^/]+)/([^/]+) /submit_core.wsgi?uuid=\$1&arch=\$2&systemuuid=\$3 [L]
 
22
        <Directory /var/www/whoopsie-daisy/backend>
 
23
                SetHandler wsgi-script
 
24
        </Directory>
 
25
        ErrorLog /var/log/apache2/error.log
 
26
        LogLevel warn
 
27
        CustomLog /var/log/apache2/access.log combined
 
28
</VirtualHost>
 
29
EOF
 
30
bzr branch lp:whoopsie-daisy /var/www/whoopsie-daisy
 
31
sudo /etc/init.d/apache2 restart