我有一个一次性的 systemd 服务,需要启动一个进程,但我不希望用户在其完成之前出现登录提示,尝试过这个:
[Unit]
Description=Stap Loader.
After=network-online.target
Before=systemd-logind.service
[Service]
Type=oneshot
LimitNOFILE=8192
ExecStart=/opt/stap/stap start
ExecStop=/opt/stap/stap stop
StandardOutput=journal+console
RemainAfterExit=yes
TTYVTDisallocate=true
TTYReset=true
[Install]
WantedBy=multi-user.target
这不管用。