How To Setup Autorun a Python Script Using Systemd
create a service file for the systemd as following. The file must have .service extension under /lib/systemd/system/ directory
sudo vi /lib/systemd/system/dummy.service
and add the following content in it. Change Python script filename ad location. Also update the Description.
[Unit] Description=Dummy Service After=multi-user.target Conflicts=getty@tty1.service [Service] Type=simple ExecStart=/usr/bin/python3 /usr/bin/dummy_service.py StandardInput=tty-force [Install] WantedBy=multi-user.target
+ Date: Thu 23 Jan 2020 | Time: | By: Javad Nasrollahi
|