In an attempt to run Eddie as a Systemd service, I find the eddie-cli internally relies on Console.ReadKey(). This results in the following being logged multiple times per second, rendering the stdout logging pretty useless:
Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
It seems Console.ReadKey() doesn't play well with redirected stdin/out.
Example Systemd service:
[Unit]
Description = AirVPN Client (Eddie)
After = network.target
[Service]
Type = exec
User = root
WorkingDirectory = /root/.config/eddie
ExecStart = /usr/bin/eddie-cli
Restart = always
[Install]
WantedBy = multi-user.target
Example Systemd journal as a result:
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:25 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:26 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
Apr 19 17:49:27 redacted eddie-cli[1234]: Console error: Cannot see if a key has been pressed when either application does not have a console or when console input has been redirected from a file. Try Console.In.Peek.
In an attempt to run Eddie as a Systemd service, I find the eddie-cli internally relies on Console.ReadKey(). This results in the following being logged multiple times per second, rendering the stdout logging pretty useless:
It seems Console.ReadKey() doesn't play well with redirected stdin/out.
Example Systemd service:
Example Systemd journal as a result: