I have a Python service in systemd. I'd like to have it use the Python syslog module for logging if it's running in systemd vs. otherwise. Is there a reliable way to determine if I'm running in systemd or is there a better way of going about it?
Can I tell if I'm running in systemd?
systemd