i have a python script that does infinite loop on functions written, and i have added this to systemd as service so i want to run python script at background and control its from systemctl
.
sudo vi /lib/systemd/system/dummy.service
[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
while configuring above service, i made a type error on the path of python script located, and since it's cant locate the file, systemctl
status says dummmy.service
failed to start.
and when i restarted RedHat Linux OS (VMware Virtual Machine), it failed to boot because there is problem in above service configuration. it is not able to open the specified file.
How to fix this Virtual Machine boot issue with service (not by just correcting mistake in service definition), So even if there is issue with path mentioned for python script, or if any issue in python scripting, it wont affect my server booting process.
Because i want to avoid getting my VM hanged due to any issues/bugs related python script/daemon service.
Please help.
thanks in advance.