Moode Forum
[SOLVED] Startup Script - Printable Version

+- Moode Forum (https://moodeaudio.org/forum)
+-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7)
+--- Thread: [SOLVED] Startup Script (/showthread.php?tid=2240)



Startup Script - normand - 03-04-2020

I have a script I want to run at startup.  In the past I put it in rc.local but that seems to break after update.  Is there a better way to start a script and keep it persistent after updates?

Edit: Suggestion by TookaFace in post http://moodeaudio.org/forum/showthread.php?tid=2240&pid=17186#pid17186 is working.

It didn't work after following a few online guides but finally had success following this guide:
https://www.raspberrypi-spy.co.uk/2015/10/how-to-autorun-a-python-script-on-boot-using-systemd/


RE: Startup Script - normand - 03-04-2020

(03-04-2020, 11:24 PM)normand Wrote: I have a script I want to run at startup.  In the past I put it in rc.local but that seems to break after update.  Is there a better way to start a script and keep it persistent after updates?

Also, currently my script will reboot the player with "sudo reboot now", but i noticed there is a reboot script in var folder.  Should that be used in favor of my current method?


RE: Startup Script - TookaFace - 03-05-2020

You could write a systemd service who call the script, it will be still here after a moOde update