Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
provision
Commits
b8f3d2b6
Commit
b8f3d2b6
authored
May 08, 2010
by
Neil Drumm
Committed by
Neil Drumm
May 08, 2010
Browse files
Clean up restart_command a little.
parent
12804ee0
Changes
2
Hide whitespace changes
Inline
Side-by-side
http/apache/apache_service.inc
View file @
b8f3d2b6
...
...
@@ -59,8 +59,8 @@ class provisionService_http_apache extends provisionService_http {
}
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.
//
TODO : test for this instead of relying on a configuration setting?
//
This is required to be configurable, due to the fact that different
//
hosts might need to do this differently.
$return
=
drush_shell_exec
(
escapeshellcmd
(
drush_get_option
(
'restart_cmd'
)));
if
(
!
$return
)
{
$msg
=
join
(
"
\n
"
,
drush_shell_exec_output
());
...
...
provision.drush.inc
View file @
b8f3d2b6
...
...
@@ -237,14 +237,15 @@ function drush_http_provision_named_context_save() {
}
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
)
{
$options
[]
=
"
$path
/apache2ctl"
;
$options
[]
=
"
$path
/apachectl"
;
}
# try to detect the apache restart command
$options
[]
=
'/usr/local/sbin/apachectl'
;
# freebsd
$options
[]
=
'/usr/sbin/apache2ctl'
;
# debian + apache2
// Try to detect the apache restart command.
$options
[]
=
'/usr/local/sbin/apachectl'
;
// freebsd
$options
[]
=
'/usr/sbin/apache2ctl'
;
// debian + apache2
$options
[]
=
'/usr/apache2/2.2/bin'
;
// Solaris
$options
[]
=
$command
;
foreach
(
$options
as
$test
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment