Bash script Onion start problem omega 2
Hello, i put the bashscript in my dropbox. here is the link
https://www.dropbox.com/sh/u3s8lqdn0f9g6u2/AACvfddIZcKHp-cJ98nmrnCPa?dl=0[link text](link url)
maybe you can try to start it.
thx lg christian
Douglas Kryder last edited by
@Christian-Munk the issue with me testing it is i need to have a working mpg123 client working on the omega2+ so i need to ask you how difficult is it to get that client operational on the omega2+ because i have never before used it, or even heard of it since i use youtube music to get my music feeds. is mpg123 a time consuming adventure?
run opkg update
opkg install mpg123
to listen the stream i connected a small usb soundcard on my onion (with a powered usb adapter)
@Douglas-Kryder and make sure you take the *.sh file from dropbox. It is my last upload and the streams should work
William Scott last edited by
@Christian-Munk One little hint on avoiding some debugging....
if [ $BUTTON2 = 'H' ]; then
If the variable BUTTONn is null, you've got a problem. Wrap the variable and it's evaluation $ in double quotes so it at least evaluates to a null string, not a null.
if [ "$BUTTON2" = 'H' ]; then
THX for the info
i included that, reduced the script to the only necessary stuff and put in the radioV2.sh in my dropbox.
https://www.dropbox.com/s/k73t8k848zceg5b/radioV2.sh?dl=0[link text](link url)
here is the error i get now on the last line:
/usr/bin/radioV2.sh: line 56: syntax error: unexpected "done" (expecting "then")
Any Ideas what is the problem here?
Dennis German last edited by
In general, first thing I always recommend is changing
/usr/bin/radio.sh & > /dev/null
/usr/bin/radio.sh & > /var/log.radio.log
Why would you throw away whatever the author of a script was trying to tell you.
The technique to solve this and many problems in general is:
- copy the origin source to source.broken (or similar)
- remove a chunk of code, especially on of a group of similar segments.
- Try it.
- Save that version and go back to step 2 if it still fails.
I have found that having 2 windows open, one with vi chopping up the code and another executing the code allows you to undo the last delete +and examine it carefully.
Another thing that you can do, when if executes but not the way you want is the oldest(well second oldest after setting an address stop +from the front panel) add output statements like
echo "got to stage2" >> script.log
logger "stepping along count:$count:" #this goes to either the local syslog hopefully configured to save messages in /var/log or even +another system that can collect the messages if the target system cannot be accessed now (or later)
Get rid of most (not all ) of the if..fi . This won't fix the problem but will allow you to get a better view of what remains.
GOT IT WORKING THX DENNIS
@Christian-Munk Please let us know the corrected version of your script too.
yoooo here is the link , how it worked for me.