<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>het probleem lijkt te zijn dat het shellscript output genereert.</p>
    <p>$cmd="/Open/Oven/check.sh parameter >/dev/null 2>&1
      &";<br>
    </p>
    lijkt te werken...<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 12-12-16 12:38, L.G. de Lagh wrote:<br>
    </div>
    <blockquote
cite="mid:CAAvsQmxNh8BcvD8sxZcLr_1aCTziCWviSQp-MQHKZaF-KL0nEg@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>Beste,<br>
                <br>
              </div>
              sorry, was iets te snel.<br>
              Opzet bash-scriptje, aan te roepen vanuit PHP in dit
              geval, zo:<br>
              <br>
            </div>
            #!/bin/bash<br>
          </div>
          blahfunctie()<br>
          {<br>
        </div>
           bash-statements en programming<br>
        <div>}<br>
          <div>
            <div>
              <div>
                <div>
                  <div>blahfunctie &<br>
                  </div>
                  <div>exit<br>
                    <br>
                  </div>
                  <div>De functie wordt direct op de (bash)achtergrond
                    uitgevoerd zodra ie gedefinieerd is.<br>
                  </div>
                  <div>OK zo?<br>
                    <br>
                  </div>
                  <div>Mvg, LGdL<br>
                  </div>
                  <div><br>
                  </div>
                  <div><br>
                    <div class="gmail_quote">---------- Doorgestuurd
                      bericht ----------<br>
                      Van: <b class="gmail_sendername">L.G. de Lagh</b>
                      <span dir="ltr"><<a moz-do-not-send="true"
                          href="mailto:laghdelg@gmail.com">laghdelg@gmail.com</a>></span><br>
                      Datum: 12 december 2016 12:23<br>
                      Onderwerp: Re: [linux] php-shellscript vraag<br>
                      Aan: paai <<a moz-do-not-send="true"
                        href="mailto:j.j.paijmans@gmail.com">j.j.paijmans@gmail.com</a>><br>
                      <br>
                      <br>
                      <div dir="ltr">
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>Beste,<br>
                                          <br>
                                        </div>
                                        even uit de losse pols, op
                                        gevaar af van mispoes, maar goed
                                        bedoeld hoor...<br>
                                      </div>
                                      In het door paai gegeven
                                      PHP-scriptje wordt de "&" m.i.
                                      niet door bash maar door PHP
                                      geinterpreteerd.<br>
                                    </div>
                                    Wat wel zou moeten kunnen: in
                                    PHP-script een bash-scriptje
                                    aanroepen, d.w.z. executeren in
                                    bash-shell.<br>
                                  </div>
                                  Het bash-scriptje zo afgericht dat ie
                                  zichzelf per omgaande naar de
                                  achtergrond verplaatst en aldaar wordt
                                  uitgevoerd.<br>
                                </div>
                                Schematishe opzet:<br>
                                <br>
                              </div>
                              #!/bin/bash<br>
                            </div>
                            ## bash-statements and programming<br>
                          </div>
                          ## Laatste 2 statements (de & wordt in
                          bash geinterpreteerd):<br>
                          $0 &<br>
                        </div>
                        exit <br>
                        <div>
                          <div>
                            <div>
                              <div>
                                <div>
                                  <div>
                                    <div>
                                      <div>
                                        <div>
                                          <div><br>
                                          </div>
                                          <div>Mvg. LGdL<br>
                                            <br>
                                          </div>
                                          <div><br>
                                          </div>
                                        </div>
                                      </div>
                                    </div>
                                  </div>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      <div class="gmail_extra"><br>
                        <div class="gmail_quote">Op 12 december 2016
                          12:03 schreef paai <span dir="ltr"><<a
                              moz-do-not-send="true"
                              href="mailto:j.j.paijmans@gmail.com"
                              target="_blank">j.j.paijmans@gmail.com</a>></span>:
                          <div>
                            <div class="h5"><br>
                              <blockquote class="gmail_quote"
                                style="margin:0 0 0 .8ex;border-left:1px
                                #ccc solid;padding-left:1ex">Heren en
                                dame.<br>
                                <br>
                                ik heb een php-script dat een gewoon
                                bash scriptje moet starten en dan meteen
                                doorgaan.<br>
                                <br>
                                <?php<br>
                                <br>
                                $cmd="/Open/Oven/check.sh parameter
                                &";<br>
                                <br>
                                system($cmd);<br>
                                <br>
                                ?><br>
                                <br>
                                <br>
                                Helaas blijft system wachten tot het
                                bash scriptje is afgelopen ondanks de
                                toevoeging van '&'.<br>
                                <br>
                                Overigens, voor passthru enzo geldt
                                hetzelfde.<span
                                  class="m_3309741894841091497HOEnZb"><font
                                    color="#888888"><br>
                                    <br>
                                    <br>
                                    Paai<br>
                                    <br>
                                    <br>
                                    <br>
                                  </font></span></blockquote>
                            </div>
                          </div>
                        </div>
                        <br>
                      </div>
                    </div>
                    <br>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Paai v.a. Danzig
</pre>
  </body>
</html>