【发布时间】:2019-03-13 10:56:31
【问题描述】:
我正在尝试将 ExecStartPre 运行的脚本的输出重定向到屏幕。
我知道我需要使用服务文件中的standardOutput,但是当我测试它们时这些选项不起作用(journal+console,tty)。 我使用了日志+控制台,输出只保存在日志中。我也尝试了 tty,但没有得到输出。
[Service]
Type=notify
StandartOutput=tty
ExecStartPre=somescript
ExecStartPre=someotherscript
ExecStart=somescript
ExecReload=/bin/kill -HUP $MAINPID
KillMode=mixed
KillSignal=SIGINT
【问题讨论】: