~marcoceppi/charms/precise/phpmyadmin/tests

« back to all changes in this revision

Viewing changes to hooks/db-admin-relation-changed

  • Committer: Marco Ceppi
  • Date: 2011-12-22 00:10:08 UTC
  • Revision ID: marco@ceppi.net-20111222001008-wsc81o0xcgpcwum1
Added control-database config parameter

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
user=`relation-get user`
13
13
password=`relation-get password`
14
14
host=`relation-get private-address`
15
 
database=`relation-get database`
 
15
database=`config-get control-database`
16
16
if [ -z "$host" ] || [ -z "$user" ]; then
17
17
        juju-log "Waiting for complete setup"
18
18
        exit 0
32
32
 
33
33
juju-log "Building $database database on $host"
34
34
 
35
 
mysqladmin -h $host -u $user --password=$password create "phpmyadmin"
 
35
mysqladmin -h $host -u $user --password=$password create "$database"
36
36
mysql -h $host -u $user --password=$password $database < $CREATE_SQL_FILE
37
37
 
38
38
juju-log "Exposing apache2 service"