システムデバイスからシステムユーザーデバイスを起動する

システムデバイスからシステムユーザーデバイスを起動する

システム化されたシステムデバイスがあるとします。

[Unit]
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

[Service]
Type=oneshot
ExecStart=<start-user-unit-here>

[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target

このシステムデバイスでユーザーデバイスをどのように起動しますか?

ベストアンサー1

[Unit]
Description=Call user unit of %i

[Service]
Type=oneshot
ExecStart=/usr/bin/systemctl --user --machine=%i@ start --wait <your-user-service-or-target>

で有効にします<system-unit-name>@<your-user>.service

私はこれをどこで得ましたか?この回答ただこれを録音したかったです。感謝の言葉ダニエル・ペレイラ

おすすめ記事