Config option to force use of init scripts

This commit is contained in:
Jamie Cameron
2013-02-23 18:16:00 -08:00
parent ed72c7ea1e
commit 6308c642cb
4 changed files with 6 additions and 3 deletions

View File

@@ -568,7 +568,7 @@ return @pids ? 1 : 0;
sub start_bacula
{
undef($bacula_status_cache);
if (&has_command($bacula_cmd)) {
if (&has_command($bacula_cmd) && !$config{'init_start'}) {
local $out = &backquote_logged("$bacula_cmd start 2>&1 </dev/null");
return $? || $out =~ /failed|error/i ? "<pre>$out</pre>" : undef;
}
@@ -583,7 +583,7 @@ else {
sub stop_bacula
{
undef($bacula_status_cache);
if (&has_command($bacula_cmd)) {
if (&has_command($bacula_cmd) && !$config{'init_start'}) {
local $out = &backquote_logged("$bacula_cmd stop 2>&1 </dev/null");
return $? || $out =~ /failed|error/i ? "<pre>$out</pre>" : undef;
}
@@ -598,7 +598,7 @@ else {
sub restart_bacula
{
undef($bacula_status_cache);
if (&has_command($bacula_cmd)) {
if (&has_command($bacula_cmd) && !$config{'init_start'}) {
local $out = &backquote_logged("$bacula_cmd restart 2>&1 </dev/null");
return $? || $out =~ /failed|error/i ? "<pre>$out</pre>" : undef;
}

View File

@@ -9,3 +9,4 @@ btape=btape
wait=1
apply=1
showdirs=0
init_start=0

View File

@@ -9,3 +9,4 @@ btape=btape
wait=1
apply=1
showdirs=0
init_start=0

View File

@@ -14,3 +14,4 @@ bacula_dir=Bacula configuration directory,0
bextract=Full path to <tt>bextract</tt> command,0
bls=Full path to <tt>bls</tt> command,0
btape=Full path to <tt>btape</tt> command,0
init_start=Start and stop Bacula using,1,1-Init scripts,0-<tt>bacula</tt> command