【问题标题】:How to redirect StandardOutput in systemd to the screen如何将 systemd 中的 StandardOutput 重定向到屏幕
【发布时间】: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

【问题讨论】:

    标签: centos7 systemd


    【解决方案1】:

    检查您的拼写。它是标准输出,而不是标准输出。

    【讨论】:

      猜你喜欢
      • 2011-01-06
      • 2023-04-01
      • 1970-01-01
      • 2019-07-14
      • 1970-01-01
      • 2011-09-27
      • 1970-01-01
      • 2016-10-01
      • 2018-05-28
      相关资源
      最近更新 更多