~mthaddon/charms/precise/memcached/basenode-and-nrpe-external

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: JuanJo Ciarlante
  • Date: 2012-12-14 21:05:09 UTC
  • mfrom: (53.1.1 memcached-jjo)
  • Revision ID: jjo@canonical.com-20121214210509-recutt828rzj07rv
[jjo,r=mew] rework basenode to use exec.d/*/charm-pre-install

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/bash
2
2
 
3
3
set -e
4
 
 
5
 
### BASENODE BEGIN ####
6
 
basenode_setup() {
7
 
    juju-log 'basenode_setup: begin'
8
 
    (cd basenode && python setup.py install)
9
 
    /usr/local/bin/basenode_init
10
 
    juju-log 'basenode_setup: end'
11
 
}
12
 
basenode_setup
13
 
### BASENODE END   ####
 
4
if [[ -d exec.d ]]; then
 
5
    shopt -s nullglob
 
6
    for f in exec.d/*/charm-pre-install; do 
 
7
        [[ -x "$f" ]] || continue
 
8
        ${SHELL} -c "$f"|| {
 
9
            ## bail out if anyone fails
 
10
            juju-log -l ERROR "$f: returned exit_status=$? "
 
11
            exit 1
 
12
        }
 
13
    done
 
14
fi
14
15
 
15
16
DEBIAN_FRONTEND=noninteractive apt-get -y install -qq memcached
16
17