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

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: Marco Ceppi
  • Date: 2011-12-08 13:28:00 UTC
  • Revision ID: marco@ceppi.net-20111208132800-70hw80xj0lct9l73
Updated install hook to accept a file from ch_get_file and to ensure it was actually downloaded

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
 
13
13
juju-log "Downloading and verifying StatusNet"
14
14
. /usr/share/charm-helper/sh/net.sh
15
 
ch_get_file http://status.net/statusnet-1.0.1.tar.gz 727a7cfe7e9531b732739dabd295bcb9
 
15
DOWNLOAD=`ch_get_file http://status.net/statusnet-1.0.1.tar.gz 727a7cfe7e9531b732739dabd295bcb9`
 
16
 
 
17
if [ -z "$DOWNLOAD" ]; then
 
18
        juju-log "Failed to retrieve download"
 
19
        exit 1
 
20
fi
16
21
 
17
22
juju-log "Extracting StatusNet"
18
23
cd /var/www
19
 
tar -xzf /tmp/statusnet-1.0.1.tar.gz
 
24
tar -xzf $DOWNLOAD
20
25
 
21
26
juju-log "Relocating files to document root"
22
27
rm index.html # this file is placed by Apache, we don't need it