Commit 84f82d78 authored by Adrian Rossouw's avatar Adrian Rossouw Committed by adrian

Test if apache can be restarted during verify, and fix the documentation for...

Test if apache can be restarted during verify, and fix the documentation for the hostmaster mysql user (#336431)
parent b92ba4c4
......@@ -37,7 +37,7 @@ function _provision_mysql_user_requirements() {
$command = <<<EOF
mysql -uroot -pXXXXXXXXX mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username_here'@'localhost' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'username_here'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
EOF;
......
......@@ -201,18 +201,21 @@ function _provision_apache_create_vhost_config($url, $data, $template = NULL) {
/**
* Restart Apache
*/
function _provision_apache_restart_apache() {
function _provision_apache_restart_apache($cause_error = FALSE) {
//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(PROVISION_RESTART_CMD));
if (!$return) {
provision_set_error(PROVISION_WEB_ERROR);
provision_log("error", "Web server could not be restarted. Changes might not be available until this has been done.");
if ($cause_error) {
provision_set_error(PROVISION_WEB_ERROR);
}
provision_log(($cause_error) ? "error" : "warning", "Web server could not be restarted. Changes might not be available until this has been done.");
}
}
function provision_apache_provision_verify() {
$exists = _provision_create_dir(PROVISION_VHOST_PATH, t("Virtual host configuration"), 0700);
_provision_apache_restart_apache(TRUE);
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment