[prev in list] [next in list] [prev in thread] [next in thread] 

List:       bacula-devel
Subject:    Re: [Bacula-devel] Doubt about Runs Script Console/Command
From:       Josh Fisher <jfisher () pvct ! com>
Date:       2016-10-26 12:02:36
Message-ID: 45b31904-b7f7-e5c8-9798-9c2d070e1c8c () pvct ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On 10/26/2016 5:35 AM, Wanderlei Huttel wrote:
> 1)Is there a way to execute multiples Run Script after Job (on server 
> and on client)
> and just execute the next Run Script if the prior Runs Script had 
> finished?

While a RunScript directive can have multiple Command or Console 
options, the only way to run commands based on the output of other 
commands is to launch a wrapper script from the RunScript, and then run 
the real scripts from the wrapper script, checking exit status of each 
one and launching the next as needed.

>
> 2) Why bacula not allow to run another Job in RunsScript console command?

It does. You can specify more than one Command or Console option in a 
RunScript directive. I have never done this, so I do not know if the 
Commands/Console options are started congruently or one after the other 
in the order given. I suspect that it is the latter.

Also, if there is an error return from any of the Commands, then the job 
will print a warning. However, with the wrapper script approach, only 
the exit status of the wrapper script determines whether the warning is 
printed.

>
>
>
> Best regards
>
> *Wanderlei Hüttel*
> http://www.huttel.com.br


[Attachment #5 (text/html)]

<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-cite-prefix">On 10/26/2016 5:35 AM, Wanderlei Huttel
      wrote:<br>
    </div>
    <blockquote
cite="mid:CADOApSDP7-nf0dBuDLxNkwNaCTk=8shCPvsziKP_7fcQcg_P7A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>1)Is there a way to execute multiples Run Script after
            Job (on server and on client)</div>
          <div>and just execute the next Run Script if the prior Runs
            Script had finished?</div>
        </div>
      </div>
    </blockquote>
    <br>
    While a RunScript directive can have multiple Command or Console
    options, the only way to run commands based on the output of other
    commands is to launch a wrapper script from the RunScript, and then
    run the real scripts from the wrapper script, checking exit status
    of each one and launching the next as needed.<br>
    <br>
    <blockquote
cite="mid:CADOApSDP7-nf0dBuDLxNkwNaCTk=8shCPvsziKP_7fcQcg_P7A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div>2) Why bacula not allow to run another Job in RunsScript
          console command?</div>
      </div>
    </blockquote>
    <br>
    It does. You can specify more than one Command or Console option in
    a RunScript directive. I have never done this, so I do not know if
    the Commands/Console options are started congruently or one after
    the other in the order given. I suspect that it is the latter. <br>
    <br>
    Also, if there is an error return from any of the Commands, then the
    job will print a warning. However, with the wrapper script approach,
    only the exit status of the wrapper script determines whether the
    warning is printed.<br>
    <br>
    <blockquote
cite="mid:CADOApSDP7-nf0dBuDLxNkwNaCTk=8shCPvsziKP_7fcQcg_P7A@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <br clear="all">
        <div>
          <div class="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div>Best regards</div>
                      <div><br>
                      </div>
                      <div><span style="font-size:12.8px"><b><font
                              color="#0b5394">Wanderlei Hüttel</font></b></span><br>
                      </div>
                      <div><span style="font-size:12.8px"><font
                            color="#0b5394"><a moz-do-not-send="true"
                              href="http://www.huttel.com.br"
                              target="_blank">http://www.huttel.com.br</a></font></span></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
  </body>
</html>


------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive. 
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik

_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic