Commit b8f3d2b6 authored by drumm's avatar drumm Committed by Neil Drumm

Clean up restart_command a little.

parent 12804ee0
...@@ -59,8 +59,8 @@ class provisionService_http_apache extends provisionService_http { ...@@ -59,8 +59,8 @@ class provisionService_http_apache extends provisionService_http {
} }
function parse_configs($cause_error = FALSE) { function parse_configs($cause_error = FALSE) {
//This is required to be configurable, due to the fact that different hosts might need to do this differently. // This is required to be configurable, due to the fact that different
//TODO : test for this instead of relying on a configuration setting? // hosts might need to do this differently.
$return = drush_shell_exec(escapeshellcmd(drush_get_option('restart_cmd'))); $return = drush_shell_exec(escapeshellcmd(drush_get_option('restart_cmd')));
if (!$return) { if (!$return) {
$msg = join("\n", drush_shell_exec_output()); $msg = join("\n", drush_shell_exec_output());
......
...@@ -237,14 +237,15 @@ function drush_http_provision_named_context_save() { ...@@ -237,14 +237,15 @@ function drush_http_provision_named_context_save() {
} }
function _provision_default_restart_cmd() { function _provision_default_restart_cmd() {
$command = '/usr/sbin/apachectl'; # a proper default for most of the world $command = '/usr/sbin/apachectl'; // A proper default for most of the world
foreach (explode(':', $_SERVER['PATH']) as $path) { foreach (explode(':', $_SERVER['PATH']) as $path) {
$options[] = "$path/apache2ctl"; $options[] = "$path/apache2ctl";
$options[] = "$path/apachectl"; $options[] = "$path/apachectl";
} }
# try to detect the apache restart command // Try to detect the apache restart command.
$options[] = '/usr/local/sbin/apachectl'; # freebsd $options[] = '/usr/local/sbin/apachectl'; // freebsd
$options[] = '/usr/sbin/apache2ctl'; # debian + apache2 $options[] = '/usr/sbin/apache2ctl'; // debian + apache2
$options[] = '/usr/apache2/2.2/bin'; // Solaris
$options[] = $command; $options[] = $command;
foreach ($options as $test) { foreach ($options as $test) {
......
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