~george-edison55/charms/precise/statusnet/added-maintainer

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: Nathan Osman
  • Date: 2011-11-29 07:00:43 UTC
  • Revision ID: admin@quickmediasolutions.com-20111129070043-xqpxjd0ty3qc6j4t
Almost finished filling in the rest of the hooks, added two utility scripts, and made some corrections here and there.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -e
4
4
 
 
5
juju-log "Copying helper scripts"
 
6
cp opt/* /usr/bin
 
7
 
5
8
juju-log "Installing required packages"
6
 
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl php5-gd wget
 
9
export DEBIAN_FRONTEND=noninteractive
 
10
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-cli postfix wget
7
11
 
8
12
juju-log "Downloading StatusNet"
9
13
cd /tmp
10
 
wget http://status.net/statusnet-1.0.1.tar.gz
 
14
wget -q http://status.net/statusnet-1.0.1.tar.gz
11
15
 
12
16
juju-log "Verifying archive integrity"
13
17
HASH=`md5sum statusnet-1.0.1.tar.gz`
26
30
rm -r statusnet-1.0.1 # only file left in folder is .gitignore
27
31
mv htaccess.sample .htaccess
28
32
 
 
33
# Retrieve this machine's hostname
 
34
HOSTNAME=`unit-get public-address`
 
35
juju-log "Retrieved hostname: $HOSTNAME"
 
36
 
 
37
# Create the initial config file
 
38
juju-log "Creating initial config file"
 
39
cat > config.php <<EOD
 
40
<?php
 
41
if (!defined('STATUSNET') && !defined('LACONICA')) { exit(1); }
 
42
$config['site']['server'] = '$HOSTNAME';
 
43
$config['site']['path'] = '';
 
44
$config['site']['profile'] = 'private';
 
45
EOD
 
46
 
29
47
juju-log "Assigning file ownership"
30
48
chown -R www-data:www-data .
31
49