[Unit] Description=Routerstats collector service [Service] ExecStart=/usr/bin/env python3 /usr/local/bin/routerstats_collector.py #So STDOUT and STDERR are not buffered Environment=PYTHONUNBUFFERED=1 Restart=on-failure KillMode=mixed [Install] WantedBy=default.target