~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-30 20:37:23 UTC
  • Revision ID: admin@quickmediasolutions.com-20111130203723-p2jfxdmtqmsbs7kp
Switched to charm helper script and added warning for incomplete configuration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 
3
3
set -e
4
4
 
 
5
juju-log "Adding Juju helper PPA"
 
6
add-apt-repository ppa:charmers/charm-helpers
 
7
apt-get update
 
8
 
5
9
juju-log "Installing required packages"
6
10
export DEBIAN_FRONTEND=noninteractive
7
 
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-cli postfix wget
8
 
 
9
 
juju-log "Downloading StatusNet"
10
 
cd /tmp
11
 
wget -q http://status.net/statusnet-1.0.1.tar.gz
12
 
 
13
 
juju-log "Verifying archive integrity"
14
 
HASH=`md5sum statusnet-1.0.1.tar.gz`
15
 
if [[ $HASH != '727a7cfe7e9531b732739dabd295bcb9  statusnet-1.0.1.tar.gz' ]] ; then
16
 
    echo "Hash verification failed!"
17
 
    exit 1
18
 
fi
 
11
apt-get install -y libapache2-mod-php5 php5-mysql php5-curl php5-gd php5-cli postfix wget charm-helper-bash
 
12
 
 
13
juju-log "Downloading and verifying StatusNet"
 
14
. /usr/share/charm-helpers/sh/net.sh
 
15
ch_file_get http://status.net/statusnet-1.0.1.tar.gz 727a7cfe7e9531b732739dabd295bcb9
19
16
 
20
17
juju-log "Extracting StatusNet"
21
18
cd /var/www
55
52
# Make port 80 available
56
53
juju-log "Opening port 80"
57
54
open-port 80/tcp
 
55
 
 
56
juju-log "Setting relation values"
 
57
relation-set hostname=`unit-get private-address` port=80