~george-edison55/charms/oneiric/thinkup/update-to-1-0-2

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: Nathan Osman
  • Date: 2011-11-19 05:59:33 UTC
  • Revision ID: admin@quickmediasolutions.com-20111119055933-mv36jmb3qxvk889w
Initial commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
 
set -e
4
 
 
5
 
juju-log "Copying PHP script"
6
 
cp opt/update_thinkup_config /usr/bin
7
 
 
8
3
juju-log "Installing required packages"
9
 
apt-get install -y php5-cli libapache2-mod-php5 php5-mysql php5-curl php5-gd mysql-client unzip wget
 
4
apt-get install -y libapache2-mod-php5 php5-curl
10
5
 
11
6
juju-log "Downloading ThinkUp"
12
 
wget https://github.com/downloads/ginatrapani/ThinkUp/thinkup_1.0.zip -O /tmp/thinkup.zip
 
7
wget https://github.com/downloads/ginatrapani/ThinkUp/thinkup_1.0.zip
13
8
 
14
9
juju-log "Extracting ThinkUp"
15
10
cd /var/www
16
 
unzip /tmp/thinkup.zip
17
 
 
18
 
juju-log "Relocating files to document root"
19
 
rm index.html # this file is placed by Apache, we don't need it
20
 
mv thinkup/* .
21
 
rmdir thinkup
22
 
mv config.sample.inc.php config.inc.php
 
11
unzip thinkup_1.0.zip
23
12
 
24
13
juju-log "Assigning file ownership"
25
 
chown -R www-data:www-data .
26
 
 
27
 
juju-log "Restarting Apache"
28
 
service apache2 restart
29
 
 
30
 
# Make port 80 available
31
 
juju-log "Opening port 80"
32
 
open-port 80/tcp
 
14
chown -R www-data thinkup
 
15
 
 
16
apt-get install -y thinkup