~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-21 02:48:41 UTC
  • Revision ID: admin@quickmediasolutions.com-20111121024841-iq5201ijkgsid615
Switched to sed for manipulating the preferences files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
set -e
4
4
 
5
5
juju-log "Installing required packages"
6
 
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl unzip wget
 
6
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl php5-gd mysql-client unzip wget
7
7
 
8
8
juju-log "Downloading ThinkUp"
9
9
wget https://github.com/downloads/ginatrapani/ThinkUp/thinkup_1.0.zip -O /tmp/thinkup.zip
16
16
rm index.html # this file is placed by Apache, we don't need it
17
17
mv thinkup/* .
18
18
rmdir thinkup
19
 
 
20
 
juju-log "Creating base configuration file"
21
 
cat > config.inc.php <<EOF
22
 
<?php
23
 
// Include the app configuration values
24
 
require_once 'config.app.inc.php';
25
 
// Include the db configuration values
26
 
require_once 'config.db.inc.php';
27
 
// Dev config values
28
 
\$THINKUP_CFG['log_location']             = false;
29
 
\$THINKUP_CFG['log_verbosity']            = 0;
30
 
\$THINKUP_CFG['stream_log_location']      = false;
31
 
\$THINKUP_CFG['sql_log_location']         = null;
32
 
\$THINKUP_CFG['slow_query_log_threshold'] = 2.0;
33
 
\$THINKUP_CFG['debug']                    = true;
34
 
\$THINKUP_CFG['enable_profiler']          = false;
35
 
\$THINKUP_CFG['set_pdo_charset']          = false;
36
 
?>
37
 
EOF
 
19
mv config.sample.inc.php config.inc.php
38
20
 
39
21
juju-log "Assigning file ownership"
40
 
chown -R www-data .
 
22
chown -R www-data:www-data .
41
23
 
42
24
juju-log "Restarting Apache"
43
25
service apache2 restart
 
26
 
 
27
# Make port 80 available
 
28
juju-log "Opening port 80"
 
29
open-port 80/tcp