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