~nijaba/charms/oneiric/roundcube/new-scp

« back to all changes in this revision

Viewing changes to hooks/roundcube-common

  • Committer: Nick Barcet
  • Date: 2011-12-10 11:02:33 UTC
  • Revision ID: nick.barcet@canonical.com-20111210110233-vr7fuma03y2jf3al
Fixing start hook (bug #795479 comment[0])
Removing complexity in config-changed (bug #795479 comment[4])

Show diffs side-by-side

added added

removed removed

Lines of Context:
131
131
# Restart apache and post some error in case of failure.
132
132
function restart-apache {
133
133
  juju-log "Restarting apache2 service"
 
134
  
 
135
  if [[ ! -e $LPATH/config/db.juju.inc.php ]] ; then
 
136
    juju-log "Database relation has not been established yet, let's no (re)start apache"
 
137
    exit 1
 
138
  fi
 
139
  
134
140
  service apache2 restart
135
141
  if [[ ! $? == 0 ]]; then
136
142
    juju-log "Failed to start apache2, check that the SSL cert file are valid (most likely). Disabling https config and restarting without it for now."