<div dir="ltr">Wayne,<div><br></div><div>I ran the script and it messed up the mysql database. I&#39;m confused on how to make your instructions work. Also how would I use visudo with the script I made?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 29, 2016 at 12:54 PM, Wayne Merricks <span dir="ltr">&lt;<a href="mailto:waynemerricks@thevoiceasia.com" target="_blank">waynemerricks@thevoiceasia.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    You can do sudo if you add a NOPASSWD flag via visudo to the script
    you need to run as sudo but thats getting ahead.<br>
    <br>
    The Rivendell init script does three things:<br>
    <br>
    1.  Create /var/run/rivendell and chown it to the rivendell group<br>
    2.  Run /usr/sbin/rdcleandirs (seems to be a relatively new thing, I
    don&#39;t remember seeing it in v2.11)<br>
    3.  Runs caed, ripcd and rdcatchd<br>
    <br>
    Other than the /var/run/rivendell bit you can run these as your
    logged in user, they don&#39;t need root access.  In some ways if you&#39;re
    using JACK it is actually easier not to run as root.<br>
    <br>
    The Pi uses Debian Jessie these days and I think systemd runs on
    that.  You could try these scripts I made for Ubuntu 16.04, in
    principle it should work:<br>
    <br>
    <a href="http://rivendell.tryphon.org/wiki/UbuntuXenial#Systemd_Services" target="_blank">http://rivendell.tryphon.org/wiki/UbuntuXenial#Systemd_Services</a><div><div class="h5"><br>
    <br>
    <br>
    <div>On 29/06/16 17:41, Seth Stevenson
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">/user/local/bin/caed etc do not seem to start
        rivendell. Only sudo /etc/init.d/rivendell start. I don&#39;t think
        you can have sudo run in a script though, can you? Don&#39;t know
        what else to try.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Wed, Jun 29, 2016 at 12:09 PM, Wayne
          Merricks <span dir="ltr">&lt;<a href="mailto:waynemerricks@thevoiceasia.com" target="_blank">waynemerricks@thevoiceasia.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> In theory you could
              replace the exec line with a script:<br>
              <br>
              Exec=/home/pi/startRivendell.sh<br>
              <br>
              #!/bin/bash<br>
              /usr/local/bin/caed &amp;<br>
              /usr/local/bin/ripcd &amp;<br>
              /usr/local/bin/rdcatchd &amp;<br>
              <br>
              sleep 5<br>
              <br>
              /usr/local/bin/rdairplay<br>
              <br>
              remember to chmod it (chmod ug+x
              /home/pi/startRivendell.sh)<br>
              <br>
              You could also make the script wait until caed etc starts:<br>
              <br>
              #!/bin/bash<br>
              <br>
              #Wait for CAED<br>
              WAIT=1<br>
              while [ $WAIT == 1 ]; do<br>
              <br>
                pidof caed &gt;/dev/null<br>
                if [[ $? -ne 0 ]]; then <br>
                  WAIT = 0<br>
                fi<br>
              <br>
                #Wait 1 second before trying again<br>
                sleep 1<br>
              <br>
              done<br>
              <br>
              #Load airplay<br>
              /usr/local/bin/rdairplay
              <div>
                <div><br>
                  <br>
                  <div>On 29/06/16 16:05, Seth Stevenson wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">I did try the autostart route. It
                      complained about missing daemons. I this is
                      because also in rc.local I have the daemons
                      starting  as /etc/init.d/rivendell start. From
                      looking at system log it seems that the programs
                      in autostart happens before rc.local runs so
                      rdairplay in autostart doesn&#39;t seem the daemons. I
                      guess the question then is how to maybe start the
                      daemons before autostart runs. I look around but
                      didn&#39;t see any way autostarting via gui. Thanks
                      for your help!</div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Wed, Jun 29, 2016 at
                        10:42 AM, Wayne Merricks <span dir="ltr">&lt;<a href="mailto:waynemerricks@thevoiceasia.com" target="_blank"></a><a href="mailto:waynemerricks@thevoiceasia.com" target="_blank">waynemerricks@thevoiceasia.com</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> don&#39;t
                            bother with rc.local it doesn&#39;t always work
                            and its hard to figure out why.<br>
                            <br>
                            I have an older pi running wheezy as opposed
                            to the newer jessie build.  <br>
                            <br>
                            Inside the users directory I have this:<br>
                            <br>
                            /home/pi/.config/autostart<br>
                            <br>
                            I&#39;m not sure if any scripts work here but
                            the standard Linux desktop files work e.g. a
                            file something like this:<br>
                            <br>
                            [Desktop Entry]<br>
                            Type=Application<br>
                            Exec=/usr/local/bin/rdairplay<br>
                            <br>
                            You can copy/paste an existing desktop file
                            into here and it should work.  Also have a
                            look around your system settings for startup
                            applications, if you have that (I think the
                            newer Pi OS&#39; do) then just use the GUI to do
                            it.
                            <div>
                              <div><br>
                                <br>
                                <br>
                                <div>On 29/06/16 15:32, Seth Stevenson
                                  wrote:<br>
                                </div>
                              </div>
                            </div>
                            <blockquote type="cite">
                              <div>
                                <div>
                                  <div dir="ltr">Hi all,
                                    <div><br>
                                    </div>
                                    <div>I have been pulling my hair out
                                      trying to autostart rdairplay on a
                                      pi. I have created a script to do
                                      this called rdairplay located at
                                      /home/bananapi. I then added the
                                      script to rc.local like this. sudo
                                      sh /etc/init.d/rdairplay. I then
                                      go to terminal and run sudo
                                      /etc/init.d/rc.local start and it
                                      runs fine and rdairplay comes up.
                                      However when I reboot it does not
                                      run the rdairplay application. I
                                      have tried everything I know. Why
                                      would it run manually, but not on
                                      reboot. Is there a better or
                                      different way to do this?<br clear="all">
                                      <div><br>
                                      </div>
                                      -- <br>
                                      <div data-smartmail="gmail_signature">Seth

                                        Stevenson</div>
                                    </div>
                                  </div>
                                  <br>
                                  <fieldset></fieldset>
                                  <br>
                                </div>
                              </div>
                              <pre>_______________________________________________
Rivendell-dev mailing list
<a href="mailto:Rivendell-dev@lists.rivendellaudio.org" target="_blank">Rivendell-dev@lists.rivendellaudio.org</a>
<a href="http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev" target="_blank">http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev</a>
</pre>
                            </blockquote>
                            <br>
                          </div>
                          <br>
_______________________________________________<br>
                          Rivendell-dev mailing list<br>
                          <a href="mailto:Rivendell-dev@lists.rivendellaudio.org" target="_blank">Rivendell-dev@lists.rivendellaudio.org</a><br>
                          <a href="http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev" rel="noreferrer" target="_blank">http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                      <br clear="all">
                      <div><br>
                      </div>
                      -- <br>
                      <div data-smartmail="gmail_signature">Seth
                        Stevenson</div>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
            <br>
            _______________________________________________<br>
            Rivendell-dev mailing list<br>
            <a href="mailto:Rivendell-dev@lists.rivendellaudio.org" target="_blank">Rivendell-dev@lists.rivendellaudio.org</a><br>
            <a href="http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev" rel="noreferrer" target="_blank">http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev</a><br>
            <br>
          </blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div data-smartmail="gmail_signature">Seth
          Stevenson</div>
      </div>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Rivendell-dev mailing list<br>
<a href="mailto:Rivendell-dev@lists.rivendellaudio.org">Rivendell-dev@lists.rivendellaudio.org</a><br>
<a href="http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev" rel="noreferrer" target="_blank">http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Seth Stevenson</div>
</div>