send stdout/stderr to console for a systemd service
<p>I have an application that we're converting from using initd to systemd. The initd scripts used to run "myscript.bash start", but the user could also run "myscript.bash start". Now when the user runs "myscript.bash start", it runs systemctl (which itself launches "myscript.bash startup") to start the service. (This is obtuse, I know - the idea is to keep the version history of the contents of myscript.bash, but also to allow users to start the system the way they are used to, the switch to systemctl should be invisible). </p>

<p>Previously, if the user ran myscript.bash, they got a bunch of updates to the console on how the startup was going. Now that information is not going to the console. I've tried a couple of things, the most promising seemed to be setting StandardOutput &amp; StandardError to tty:</p>

<pre><code>StandardOutput=tty
StandardError=tty
ExecStart=/bin/bash -c './myscript.bash startup &amp;'
ExecStop=/bin/bash -c './myscript.bash shutdown'
</code></pre>

<p>But I get this error:</p>

<pre><code>systemd[20694]: Failed at step STDOUT spawning /bin/bash: Inappropriate ioctl for device
</code></pre>

<p>I've looked at this: <a href="https://stackoverflow.com/questions/32968506/how-to-pipe-output-to-a-file-when-running-as-a-systemd-service">How to Pipe Output to a File When Running as a Systemd Service?</a> (which gave me the idea to try StandardOutput=), but the goal there is to write to a file and I'm trying to get output to the user's console.</p>

<p>Is this because we have a script running systemctl, instead of it being launched directly by the user? Is there a way to do this? </p>