systemd 输出到特定tty

[Unit]
Description=some program
Wants=network-online.target
After=network.target network-online.target

[Service]


ExecStart=<someprogram> 
  
StandardOutput=tty
#StandardOutput=append:/var/log/syncstd.log
StandardError=append:/var/log/syncerr.log
TTYPath=/dev/pts/2
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

参考:
http://www.jinbuguo.com/systemd/systemd.exec.html#
jinbuguo.com/systemd/systemd.html

原文地址:http://www.cnblogs.com/yiminlin/p/16852722.html

发表评论

您的电子邮箱地址不会被公开。