~charmers/charms/precise/tomcat7/precise

« back to all changes in this revision

Viewing changes to hooks/install

  • Committer: James Page
  • Date: 2011-09-20 12:58:00 UTC
  • Revision ID: james.page@canonical.com-20110920125800-gbvlc77144a1g8di
Ensemble->juju naming changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
# Install the packages
8
8
install_tomcat7 () {
9
 
        ensemble-log "Installing tomcat7 packages..."
 
9
        juju-log "Installing tomcat7 packages..."
10
10
        apt-get install -y -qq tomcat7 tomcat7-admin tomcat7-docs tomcat7-examples uuid
11
11
}
12
12
[[ -d /usr/share/tomcat7 ]] || install_tomcat7
14
14
# Reconfigure the tomcat-users.xml file to reflect the admin username and password
15
15
# as well as add the admin roles.
16
16
reconfigure_tomcat7 () {
17
 
        ensemble-log "Reconfiguring admin accounts for tomcat7..."
 
17
        juju-log "Reconfiguring admin accounts for tomcat7..."
18
18
        # Grab any user specified configuration OR defaults
19
19
        ADMIN_USERNAME=$(config-get admin_username)
20
20
        ADMIN_PASSWORD=$(config-get admin_password)
26
26
}
27
27
reconfigure_tomcat7
28
28
 
29
 
ensemble-log "Restarting tomcat7 to pickup changes..."
 
29
juju-log "Restarting tomcat7 to pickup changes..."
30
30
service tomcat7 status && service tomcat7 restart || service tomcat7 start
31
31
 
32
 
ensemble-log "Opening port for http connector..."
 
32
juju-log "Opening port for http connector..."
33
33
open-port 8080
34
34
 
35
35
exit 0