Initial Angstrom processes [beaglebone]

I have an RFID module attached to my beaglebone and read identification tags with Python code. Now, I want my python code to start running in the background directly when I log in with my beaglebone without any commands. As well as adding programs to run programs on Windows. When you log in to your Windows account, these programs start instantly. Do you have an idea how to do this?

Hi

+5
source share
2 answers

Create a new file in / lib / systemd / system / (rfidreader.service in my example) with content like:

[Unit]
Description=Start Python RFID reader

[Service]
WorkingDirectory=/...Python script path.../
ExecStart=/usr/bin/python rfidreader.py
KillMode=process

[Install]
WantedBy=multi-user.target

Then run the following command to install the service:

systemctl enable rfidreader.service

, , :

systemctl start rfidreader.service

, , script:

systemctl status rfidreader.service
+16

, nodejs 3000 , . , init.

http://www.softprayog.in/tutorials/starting-linux-services-with-init-scripts http://www.linuxquestions.org/questions/linux-general-1/how-do-i-automatically-start-a-program-at-start-up-102154/

0

All Articles