How to run Python programs at startup, on Raspberry Pi

Опубликовано: 06 Октябрь 2024
на канале: Kevin McAleer
14,570
239

Do you want to know how to automatically start your Python programs when your Raspberry Pi boots up and have them self-heal and restart on failure? Then this is the video for you.

In this video I'll show you how to create a SystemD service definition file so that you can run Python scripts, or actually any program automatically when your computer boots up.

Join this channel to get access to perks:
   / @kevinmcaleer28  

💁‍♂️ For more information on SMARS Robots, tutorials and more visit: https://www.smarsfan.com​

🎖To join the membership at 🥉bronze, 🥈silver or 🥇gold levels, head over to
https://www.smarsfan.com/membership

Join the list - https://action.smarsfan.com/join-the-...

☕️ Enjoy this video? Buy me a coffee! https://www.buymeacoffee.com/kevinmca...

📸 Follow me on Instagram - @kevinmcaleer   / kevinmcaleer  
🐦 Follow me on Twitter - @kevsmac   / kevsmac  
🙂📘 Join the Facebook group - Small Robots   / smallrobots  

👩‍💻 My Code on GitHub: https://www.github.com/kevinmcaleer

🎵 Music by Epidemic Sounds https://www.epidemicsound.com/referra...

Chapters:
00:00 Intro
00:27 Get-Subs Python program
01:42 How to create a service file
04:47 Enabling the Service
05:16 Starting the Service
05:38 Stopping & Restarting the Service
05:58 Disabling the Service
06:29 Self-Healing demo
07:20 Service Status using systemctl
08:06 Subscriber scroller Demo





#RaspberryPi​ #Python​ #Robotics