我正在尝试将ExecStartPre运行的脚本的输出重定向到屏幕。
我知道我需要在service`s文件中使用standardOutput,但是当我测试它们时,这些选项没有用(journal + console,tty)。我使用了journal + console,输出只保存在日志中。我也试过tty,但我没有得到输出。
[Service]
Type=notify
StandartOutput=tty
ExecStartPre=somescript
ExecStartPre=someotherscript
ExecStart=somescript
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
检查你的拼写。它是StandardOutput,而不是StandartOutput。