~jorge/charms/precise/lamp/readme-fixes

« back to all changes in this revision

Viewing changes to hooks/config-changed

  • Committer: Victor Palau
  • Date: 2012-10-08 15:17:37 UTC
  • Revision ID: vtuson@gmail.com-20121008151737-qon0xohpo4tg036f
fixed bugs and comments from latest review

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
 
 
3
set -e
3
4
BZR_BRANCH=`config-get website-bzr`
4
5
BZR_PULL=`config-get bzr-update`
5
6
bzr_config="config/bzr"
17
18
   bzr pull
18
19
   cd ..
19
20
   cp website/mysql_conf config
20
 
   cp website/* /var/www/ -r
 
21
   cp -r website/* /var/www/
21
22
   chown -R www-data:www-data /var/www
22
23
  fi 
23
24
 else
24
25
  #if the bzr set has change we delete the congig file and let the next statement set up the branch
25
 
  juju-log " $bzr_current and $BZR_branch are not the same"
 
26
  juju-log " $bzr_current and $BZR_BRANCH are not the same"
26
27
  rm $bzr_config
27
28
 fi       
28
29
fi
34
35
 rm -r website
35
36
 bzr branch $BZR_BRANCH website
36
37
 cp website/mysql_conf config
37
 
 cp website/* /var/www/ -r
 
38
 rm -r /var/www/*
 
39
 cp -r website/* /var/www/
38
40
 chown -R www-data:www-data /var/www
39
41
 echo "$BZR_BRANCH" > $bzr_config
40
42
 juju-log " adding $BZR_BRANCH to $bzr_config file"