I have an application that writes and reads to an interactive terminal, and when I run it via the shell, it works as expected. However, when I run it as a systemd service, it seems as though the application isn't capturing the stdout or stderr.
I have tried modifying the StandardOutput and StandardError in the service definition to
The service section of my systemd file looks like this :
[Service] ExecStart=/bin/bash -c "cd /somedir && python3 myapp.py" ExecStop= Restart=always RestartSec=10 StandardOutput=tty StandardError=tty
I have also tried setting
TTYPath=/dev/tty2, but no luck.
I am running Ubuntu 16.04.
Edit: More info
When I run this app, the interactive session that it creates does not get read from/written to in the terminal where I actually run the app. It emulates its own terminal.
See link here: