首页 > 其他分享 >systemd 输出到特定tty

systemd 输出到特定tty

时间:2022-11-02 22:26:47浏览次数:70  
标签:输出 systemd target tty log append network

[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

标签:输出,systemd,target,tty,log,append,network
From: https://www.cnblogs.com/yiminlin/p/16852722.html

相关文章