Logo Search packages:      
Sourcecode: aegir-provision version File versions  Download package

_provision_apache_restart_apache ( cause_error = FALSE  ) 

Restart Apache

Definition at line 118 of file provision_apache.drush.inc.

Referenced by drush_provision_apache_post_provision_install().

                                                                {
  //This is required to be configurable, due to the fact that different hosts might need to do this differently.
  //TODO : test for this instead of relying on a configuration setting?
  $return = drush_shell_exec(escapeshellcmd(drush_get_option('restart_cmd')));
  if (!$return) {
    if ($cause_error) {
      return drush_set_error('PROVISION_WEB_RESTART_FAILED', dt("Web server could not be restarted. Changes might not be available until this has been done."));
    }
    else {
      drush_log(dt("Web server could not be restarted. Changes might not be available until this has been done."), "warning");
    }
  }
  else {
    drush_log(dt('Apache has been restarted'));
  }

  return $return;
}


Generated by  Doxygen 1.6.0   Back to index