Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Startup scripts not anymore run at boot after a Moode update
#1
Hi guys
Last week I updated the system to Moode 6.7, and it seems to work fine. Two days ago, after a power outage, I'm not anymore able to run a couple of scripts at RPi startup. I'll try to explain better:

Until two days ago, in the rc.local file, I added the two following lines:

Code:
(sleep 5; sudo python /usr/local/bin/RaspDacDisplayAL.py) &
/etc/mauseswitch.sh &
exit 0


The python script is dedicated to manage the OLED display I have in my system, while the mauseswitch.sh is dedicated to controlled shutdown (managed by a MauseBerry micro-board and a momentary Led button). 
The system goes up, but the two scripts for an unknown (to me) reason are not anymore automatically started. Obviously if I open the console and type "sudo python RaspDacDisplayAL.py" it starts correctly and the OLED display is populated with current playing info (title, artist, duration lenght, kbs, audio type, etc.).

Being the "rc.local method" not anymore working, I red that there are alternative and more modern ways to do it, but not being a Linux expert is not too easy to understand which'd be the best possible option.

Two additional notes:
1) I already apply the sudo chmod 77 to the mauseswitch.sh to make it executable.
2) The RaspDacDisplayAL.py "calls" others two python scripts : Winstar_GraphicOLED.py (that's basically the driver for the display) and pages.py (a configuration file used to select which info shall be shown on the display)

Any suggestion how to proceed ? 

thanks in advance
Andrea

P.S. apologize for the bad english, hope the request was clear....
Reply
#2
Try executing rc.local from command line and see if there are any errors printed. Also verify that you modifications are still in the file.

Code:
cat /etc/rc.local

Code:
sudo /etc/rc.local
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#3
@Tim Curtis
I try to add only the line related to python script trying to adopt a stepwise approach.
Running rc.local, it wrote only "On demand" and nothing else.
Reply
#4
Printing "On demand" is normal and no errors is good.

It's not obvious to me what's happening on your end.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#5
neither to me....
BTW, I modify the rc.local adding first the python script... and that's OK, after startup I can see music info on display . OK
Then I added the shutdown sh script... reboot... and it works !
Honestly I don't know what happened (also because I follow well defined procedure any time I update Moode or any time that I re-install it from scratch, and I think that I've done it at least 25-30 times in the last two years).
So, now the system is up and running, being also updated 6.7.1 Moode version (may the issues arise due to some bugs present in 6.7 and fixed in 6.7.1 ?)
Reply
#6
moOde in-updates replace all the sources, some of the entries in the sql database including whole tables and many of the config files including rc.local. This to ensure the integrity of the update and that the system boots after applying it because we have no way of knowing what kinds of user modifications may have been done to the system.

lol, in the last two years I've prolly loaded moOde from scratch 10,000 times. I would do 25 or 30 in one day sometimes during heavy development.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#7
Hi hi... I could imagine...during last days of development (and testing) before any release... it's always a nightmare (I work in the IT since from 88, I know very well...)
Reply


Forum Jump: