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.
The Rivendell init script does three things:
1. Create /var/run/rivendell and chown it to the rivendell group
2. Run /usr/sbin/rdcleandirs (seems to be a relatively new thing, I
don't remember seeing it in v2.11)
3. Runs caed, ripcd and rdcatchd
Other than the /var/run/rivendell bit you can run these as your logged
in user, they don't need root access. In some ways if you're using JACK
it is actually easier not to run as root.
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:
http://rivendell.tryphon.org/wiki/UbuntuXenial#Systemd_Services
On 29/06/16 17:41, Seth Stevenson wrote:
/user/local/bin/caed etc do not seem to start rivendell. Only sudo
/etc/init.d/rivendell start. I don't think you can have sudo run in a
script though, can you? Don't know what else to try.
On Wed, Jun 29, 2016 at 12:09 PM, Wayne Merricks
<[email protected]
<mailto:[email protected]>> wrote:
In theory you could replace the exec line with a script:
Exec=/home/pi/startRivendell.sh
#!/bin/bash
/usr/local/bin/caed &
/usr/local/bin/ripcd &
/usr/local/bin/rdcatchd &
sleep 5
/usr/local/bin/rdairplay
remember to chmod it (chmod ug+x /home/pi/startRivendell.sh)
You could also make the script wait until caed etc starts:
#!/bin/bash
#Wait for CAED
WAIT=1
while [ $WAIT == 1 ]; do
pidof caed >/dev/null
if [[ $? -ne 0 ]]; then
WAIT = 0
fi
#Wait 1 second before trying again
sleep 1
done
#Load airplay
/usr/local/bin/rdairplay
On 29/06/16 16:05, Seth Stevenson wrote:
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't seem the daemons.
I guess the question then is how to maybe start the daemons
before autostart runs. I look around but didn't see any way
autostarting via gui. Thanks for your help!
On Wed, Jun 29, 2016 at 10:42 AM, Wayne Merricks
<[email protected]
<mailto:[email protected]>> wrote:
don't bother with rc.local it doesn't always work and its
hard to figure out why.
I have an older pi running wheezy as opposed to the newer
jessie build.
Inside the users directory I have this:
/home/pi/.config/autostart
I'm not sure if any scripts work here but the standard Linux
desktop files work e.g. a file something like this:
[Desktop Entry]
Type=Application
Exec=/usr/local/bin/rdairplay
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' do) then just use the GUI to do it.
On 29/06/16 15:32, Seth Stevenson wrote:
Hi all,
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?
--
Seth Stevenson
_______________________________________________
Rivendell-dev mailing list
[email protected]
<mailto:[email protected]>
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
[email protected]
<mailto:[email protected]>
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
--
Seth Stevenson
_______________________________________________
Rivendell-dev mailing list
[email protected]
<mailto:[email protected]>
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev
--
Seth Stevenson
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://caspian.paravelsystems.com/mailman/listinfo/rivendell-dev