Manual Roon Bridge scripts confused - busybox/bash

I’m running a manual setup Roon Bridge on a LibreELEC install.

LibreELEC uses busybox as its shell.
/bin/sh and /bin/bash are links to /bin/busybox.

Busybox does not like the bash exec ways.

All the Roon Bridge scripts know that Bash is not always available, and there are tests to run the appropriate commands. However, those tests only test for the presence of bash.

In my case, those tests are successful because of the link from bash to busybox, The following bash exec command fails.

If I change the tests manually for bashxyz, the correct exec is run and all works.

I do not mind changing the scripts once, but they get reverted every time that there is a Roon Bridge update.

@support a better test for real bash would be preferable. Or a test for busybox…

Hello Nicolas,

I would like to install RoonBridge on my LibreELEC install (running on a ChromeBox). Unfortunately, my knowledge of Linux is quite rudimentary at this time.

I wonder if you could share your modified scripts?

Thanks in advance,

Pierre

Sorry, been busy!

If you want to use the HDMI out, or the dodgy analogue out, you have to edit the basic Raspberry Pi configuration file, making sure that ALSA will display all devices available:

As LibreELEC’s system is generally a read-only system by default, you will need to get those write-permissions first:

mount -o remount,rw /flash

‘Nano’ is a very easy-to-use built-in text editor:

nano /flash/config.txt

In there add the following line:

dtparam=audio=on

To save the changes you made, press CTRL + o and save the file.
Press ENTER to confirm the existing filename.
To exit the nano editor, press CTRL + x.
Now you have to change back the read/write permissions of the system partition to ‘read-only’ again:

mount -o remount,ro /flash

You need to reboot for the changes in the config.txt to take effect:

reboot

You will have installed the Roon Bridge software, you need to edit 3 scripts:

cd ~/RoonBridge/Bridge

Using nano, like above, you will have to edit 3 files the same way:

RAATServer
RoonBridge
RoonBridgeHelper

Look, towards the end, for the following:

if [ -x /bin/bash ]; then

and add something after bash, like that:

if [ -x /bin/bashx ]; then

Once edited and saved:

cd ..
./start.sh

Once started you can exit the script with a CTRL + C.

All done!

A better detection of a real bash shell would be better…

1 Like

@support if /usr/bin/bash is a symlink, chances are it’s not Bash! a simple [ -L /usr/bin/bash ] would solve the issue

Fantastic work, many thanks! Did you find a way to run start.sh on boot?

Also, for anyone else trying, don’t worry that check.sh fails, it still works.

I’m running a Pi2 with a HiFiBerry DAC+

EDIT: Got the script to launch on boot by adding an autostart.sh file in ~/.config

ssh into your pi
cd .config

nano autostart.sh

#!/bin/bash
(
/storage/RoonBridge/start.sh
) &

chmod +x autostart.sh

Hi Nicolas,

Thanks a lot for your tips: roonbridge is now working on my chromebox.

I had to make a few other changes than those you mentioned, probably because I had to start from the x86 scripts.

cheers,

Pierre