~daisy-pluckers/charms/precise/daisy-retracer/trunk

« back to all changes in this revision

Viewing changes to hooks/upgrade-charm

  • Committer: Evan Dandrea
  • Date: 2013-05-03 15:57:28 UTC
  • mfrom: (28.1.2 daisy-retracer)
  • Revision ID: evan.dandrea@canonical.com-20130503155728-e8k0jbpe1f8urmyo
Merge Liam's branch to add nrpe hooks and clean up the code deployment.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
 
set -e
3
 
 
 
2
set -eux
4
3
home=$(dirname $0)
5
 
juju-log "Upgrading charm by running install hook again."
6
 
$home/install
7
 
juju-log "Finishing charm upgrade by reconfiguring."
 
4
 
 
5
. hooks/common
 
6
charm_dir="$(pwd)"
 
7
deploy_code "$charm_dir/files/daisy.tgz" $CODE_LOCATION $DAISY_CODE_DIRS
 
8
 
 
9
apport="$charm_dir/files/apport.tgz"
 
10
if [ -f "$apport" ]; then
 
11
    deploy_code "$apport" $APPORT_LOCATION $APPORT_CODE_DIRS
 
12
    cd "$APPORT_LOCATION"
 
13
    rm -f apport/packaging_impl.py
 
14
    ln -s ../backends/packaging-apt-dpkg.py apport/packaging_impl.py
 
15
fi
8
16
$home/config-changed
 
17
retracer_restart