I hope this isnt a duplicate question. Systemd is really hard to search for....
I have a systemd file that looks like
[Unit]
Description=My Daemon
[Service]
User=root
Type=simple
PIDFile=/var/run/app.pid
ExecStart=/usr/bin/python /opt/app/app.pyc
Restart=always
[Install]
WantedBy=multi-user.target
I want ExecStart to run /usr/bin/python /opt/app/app.pyc if it exists and run /usr/bin/python /opt/app/app.py if it doesnt.
The goal that on the deployed system there will not be a py file only a pyc but on dev systems we might only have a py file. How can I get this to work?